Has anyone gotten the Method DiscoverAuthority from the following sample to work with ADFS?
https://msdn.microsoft.com/en-us/library/dn481599.aspx
I keep getting this error: Invalid authenticate header format
I presume is because the response.headers["WWW-Authenticate"] contains ",Negotiate,NTLM" and thus the cast Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationParameters. CreateFromResponseAuthenticateHeader((response.Headers)["WWW-Authenticate"]);
returns null
I got it to work by hardocding the oauth URL to https://[adfsurl]/adfs/ls instead of
https://<serverFQDNaddress>/adfs/ls/XRMServices/2011/Organization.svc/web as the sample explains.
any insights would be great.
Thanks