Azure-Samples / ms-identity-mobile-apple-swift-objc

An iOS sample in Swift that authenticates Microsoft Account and Azure AD users and calls the Graph API using OAuth 2.0
https://aka.ms/aaddev
74 stars 37 forks source link

Use with Azure AD? #3

Closed olavt closed 7 years ago

olavt commented 7 years ago

I tried to use this sample against my Azure AD tenant. I registered a native app using the Azure AD Portal. But, when I enter my Azure AD username / password I get the following error message: "AADSTS70001: Application '' is not supported for this API version."

How can this be used with an Azure AD tenant?

bbjwerner commented 7 years ago

@olavt Did you use the portal at https://apps.dev.microsoft.com? This is the portal that creates an application which can be used with our new v2 endpoint and MSAL.

olavt commented 7 years ago

Ok, I used the regular Azure Portal to register my app in my Azure AD tenant. That was the issue. I now registered the app at https://apps.dev.microsoft.com and now everything worked as expected.

Maybe a little more information about that step could be added to clarify. I though that portal was for other scenarios and it's a little confusing to have multiple places to register apps. It's also important to login with your Azure AD tenants account when registering the app at https://apps.dev.microsoft.com.

bbjwerner commented 7 years ago

Updated with your feedback. Let me know if it is more clear.