Vindberg
Vindberg

Reputation: 1552

Azure API Management - OAuth server Token endpoint?

im currently setting up an Web API on Azure Cloud Service and want to use Azure API Management with OAuth and Azure Active Directory (AD) as Authorization Server.

My question is: In AD I have created my application and looking in the "View Endpoints" list my endpoint for the token request is (not with original key):

https://login.windows.net/e4b3b3s1-02yt-8fw1-54i3-973aa45rd56b/oauth2/token?api-version=1.0

However, in this tutorial: http://azure.microsoft.com/en-us/documentation/articles/api-management-howto-oauth2/

The format for token request is:

https://login.windows.net/<APPID>/oauth2/token

For an Azure Active Directory OAuth 2.0 server, the Token endpoint
URL will have the following format, where has the format of
yourapp.onmicrosoft.com.

which one should I use?

Thanks in advance.

Upvotes: 1

Views: 3262

Answers (2)

ilkahnate
ilkahnate

Reputation: 619

See this question/answer. Use what the Active Directory Console gives you - it will work.

Upvotes: 1

nababa
nababa

Reputation: 1321

I would suggest using the ones listed in AAD because they have the addition parameter specifying the version to use.

Upvotes: 1

Related Questions