Cannot Exit Active Directory Using Azure ACS

I am using ACS 2.0 in my MVC 4 application.

It is already configured to log in and works for various vendors, including ADFS. I need to implement logout functions.

As this question is already outdated, I used the code for these samples :

Here's what it looks like:

    // Load Identity Configuration 
    FederationConfiguration config = FederatedAuthentication.FederationConfiguration;

    // Get wtrealm from WsFederationConfiguation Section 
    string wtrealm = config.WsFederationConfiguration.Realm;
    string wreply = wtrealm; //return url

    // Read the ACS Ws-Federation endpoint from web.Config 
    string wsFederationEndpoint = ConfigurationManager.AppSettings["ida:Issuer"];

    SignOutRequestMessage signoutRequestMessage = new SignOutRequestMessage(new Uri(wsFederationEndpoint));

    signoutRequestMessage.Parameters.Add("wreply", wreply);
    signoutRequestMessage.Parameters.Add("wtrealm", wtrealm);

    FederatedAuthentication.SessionAuthenticationModule.SignOut();

    var signoutUrl = signoutRequestMessage.WriteQueryString();

As a result, I get the URL of the output to which I have to redirect, it will take out tokens and send me back. The URL is as follows:

https://myacsnamespace.accesscontrol.windows.net/v2/wsfederation?wa=wsignout1.0&wreply=http%3a%2f%2flocalhost%3a61192%2f&wtrealm=http%3a%2f%2flocalhost%3a61192%2f

, , Google, Yahoo Microsoft. , , , .

ADFS, :

  • .

  • ADFS

  • AD

  • ADFS , 2 .

, , ACS , ADFS, .

- , ACS ?

!

+5
1

+1 @oren-melzer: . auth ( cookie), , , auth , 401. " 401 " , , .

0

All Articles