Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Authentication with Mobile service failed on domain joined PC.

$
0
0

I have an odd situation.

I am creating a Windows Azure Mobile Service that I an trying to work on getting Authentication working.

Our domain has ADFS set up, and working. We have our domain Synced up to Azure as well.

I have followed all of the steps for setting up Azure AD Authentication. (Several times)

When I run my application, on my development PC, which is not domain joined I get the following:

Application starts up. Application runs through the Authentication code, and attempts to Authorize against AD. At this point I get the typical web page asking for a user name and password. I enter in my email address, and the page jumps to our ADFS page, where I can enter in my email address, and domain password. The application then logs in successfully.


When I run my application, on my office PC, which IS domain joined I get the following:

Application starts up. Application runs through the Authentication code, and attempts to Authorize against AD. At this point I get the typical web page asking for a user name and password. I enter in my email address, at this point the page attempts to connect to the ADFS page, however I get the unhelpful "Can't Connect to the service", "We can't connect to the service you need right now. Check your network connection or try this again later."

Also, if I switch the application over to the default Azure AD, instead of the one that is synchronized with my organizations domain, everything works fine on both PC's.

So it would seem that there are issues with ADFS / Azure AD / Domain joined PC's... However I am at a loss as to how to proceed.

The Authentication code is right out of the examples:

AuthenticationContext ac = newAuthenticationContext(authority);

AuthenticationResult ar = await ac.AcquireTokenAsync(resourceURI, clientID, (Uri)null);

After this code runs the AuthenticationResult has:

Error: authentication_failed

ErrorDescription: 401

Status: ServiceError

StatusCode: 0

However I am using the same credentials on both the PC that works, and the PC that doesn't.

Also if I browse to https://servicename.azure-mobile.net/login/aad on the PC that the code does not work, I am able to log in and get a security token returned.All of which tells me that everything should be working...


Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>