Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8581187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:59:15+00:00 2026-06-11T20:59:15+00:00

I am using ACS to authenticate in a Windows 8 application. I am observing

  • 0

I am using ACS to authenticate in a Windows 8 application. I am observing exactly what I expect in that the UI displays the authentication dialog and on successfully entering my LiveID credentials I am returned to my code with a Success status but I do not receive a security token, I simply get “https://XXXXX.accesscontrol.windows.net/v2/wsfederation?wa=wsignin1.0” in result.ResponseData

The code is as follows:

  string loginUriString = "https://XXXXX.accesscontrol.windows.net:443/v2/wsfederation?wa=wsignin1.0&wtrealm=http%2f%YYYYY.cloudapp.net";
    string redirectUriSting = "https://XXXXX.accesscontrol.windows.net:443/v2/wsfederation";

    string authToken;
    bool IsAuthenticated = false;

    private async Task AuthenticateAsync()
    {           
        var requestUri = new Uri(loginUriString, UriKind.RelativeOrAbsolute);

        var redirectUri = new Uri(redirectUriSting, UriKind.RelativeOrAbsolute);

        //var testUri = WebAuthenticationBroker.GetCurrentApplicationCallbackUri();

        var result = await WebAuthenticationBroker.AuthenticateAsync(
            WebAuthenticationOptions.None,
            requestUri,
            redirectUri);

        if (result.ResponseStatus != WebAuthenticationStatus.Success)
            throw new Exception(string.Format("Login failed : {0}", result.ResponseErrorDetail));

        //authToken = ExtractTokenFromResponse(result.ResponseData);

        //if (!string.IsNullOrEmpty(authToken))
        //{
        _client.DefaultRequestHeaders.Authorization =
            new System.Net.Http.Headers.AuthenticationHeaderValue("OAuth", result.ResponseData);

        IsAuthenticated = true;
        //}
    }

I have seen one other SO question here with what seems like a similar problem but nothing else. Have I got something wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:59:16+00:00Added an answer on June 11, 2026 at 8:59 pm

    The WebAuthenticationBroker simply keeps browsing until the next requested page is the one specified by the callbackUri parameter. At that point it returns the final URL to you so if you want to get anything back it needs to be encoded in that URL.

    In the ACS control panel for the relying party you need to specify a return url that is somewhere on your site. For example https://YYYYY.cloudapp.net/federationcallback. Then create a controller to handle accept a post to that URL. The post will have a form field wresult which is some xml that will contain the token returned from ACS.

    You can then send the token back to the WebAuthenticationBroker by redirecting to https://YYYYY.cloudapp.net/federationcallback/end?token={whatever you want to return}

    You would then need to change the usage of the authentication broker to the following:

    var webAuthenticationResult = await WebAuthenticationBroker.AuthenticateAsync(
                WebAuthenticationOptions.None,
                new Uri("https://XXXXX.accesscontrol.windows.net:443/v2/wsfederation?wa=wsignin1.0&wtrealm=http%3a%2f%2fYYYYY.cloudapp.net%2f"),
                new Uri("https://YYYYY.cloudapp.net/federationcallback/end")
            );
    
    // The data you returned
    var token = authenticateResult.ResponseData.Substring(authenticateResult.ResponseData.IndexOf("token=", StringComparison.Ordinal) + 6);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service that uses UserName authentication via ACS. This works great
I have a web application written in ASP .NET MVC 3. I'm using ACS
I've created a basic MVC 3 website that's using Windows Azure's Access Control Service
I'm working with the Azure ACS Labs where they are using FederatedServiceCredentials to authenticate
I'm building an Azure-hosted WCF service that I'd like to secure with ACS using
I am using a user control that I created (just a .cs file not
We are using Azure ACS together with WIF on a Win2003 R2 server, running
I know that ProfileCommon is not available in a Web Application Project (WAP), but
I'm working on a C# application that is supposed to examine other C# executables
I'm developing an application in C# that connects to Appcelerator Cloud Service, so far

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.