Search code examples
azureazure-active-directoryadal

Understanding resource and authority url


I am trying to access azure resource manager through rest and part of the process is to provide an authorization header. I have been able to successfully retrieve the token by using adal library.

I can use either https://management.core.windows.net/ or https://management.azure.com/ as the resource URL to get the token. What is the difference between two ?

I also would like to understand the difference between login.microsoftonline.com/ and https://login.windows.net/ as the authority URL


Solution

  • I can use either https://management.core.windows.net/ or https://management.azure.com/ as the resource URL to get the token. What is the difference between two ?

    management.core.windows.net is the endpoint for Azure Service Management REST API while management.azure.com is the endpoint for Azure Resource Manager REST API.

    I also would like to understand the difference between login.microsoftonline.com/ and https://login.windows.net/ as the authority URL

    Both of them are essentially the same but it is recommended that you use login.microsoftonline.com as login.windows.net redirects to that. So if you use former, you're saving on one redirect. However it is recommended that you start using former. Please read this blog post for more details: https://blogs.technet.microsoft.com/enterprisemobility/2015/03/06/simplifying-our-azure-ad-authentication-flows/.