Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

From a browser, if I have a single ADFS (STS), when I attempt to access a SharePoint site, I can get the ADFS URL and realm from the redirect in HTTP reponse for authentication. If I have more than 1 STS servers configured on a SharePoint site, I will be prompted (Home Realm Discovery) with available realms and ADFS servers to select where to authenticate.

But is there a way to get these programmatically from SharePoint (not thru HTTP redirect or web page prompting), e.g. SOAP API or REST API?

share|improve this question
up vote 0 down vote accepted

There is no ADFS direct API.

There are AD FS 2.0 Cmdlets in Windows PowerShell.

The one you want is "Get-ADFSClaimsProviderTrust".

You can access PowerShell from e.g. C#. Then you would just have to parse out the response.

share|improve this answer
    
My code is on the client side, so I don't think I can access power shell... – M W Oct 22 '12 at 16:29
    
You could have the PowerShell code in a web service which you can call. – nzpcmad Oct 22 '12 at 17:38
    
Ok I see. Will try... thanks! – M W Oct 22 '12 at 21:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.