Integrating Auth0 With Azure Active Directory

Appendix

This is some information that you will find useful when completing Azure Active Directory and Auth0 integration.

Azure AD OpenID config endpoint

Azure AD Login URL

If you want to try logging into to your app registration on Azure AD to validate it is configured correctly to allow sign-in for your Azure AD user this can be done using the following URL:

https://login.microsoftonline.com/your-tenant-id/oauth2/v2.0/authorize?

client_id=your-app-registration-client-id

&response_type=code

&redirect_uri=your-app-registration-callback-url

&response_mode=query

&scope=offline_access%20user.read%20directory.read.all

&state=12345

After logging in you should be able to retrieve an authorization code in the URL. You can use this via Postman to post to the Azure AD token endpoint and retrieve a JWT as follows:

HTTP POST https://login.microsoftonline.com/your-tenant-id/oauth2/v2.0/token

HEADER

Content-Type: application/x-www-form-urlencoded

BODY

              client_id: your-app-registration-client-id

              code: your-authorization-code

              redirect_uri: your-app-registration-redirect-uri

              grant_type: authorization_code

              client_secret: your-app-registration-client-secret

Auth0 Login URL

To login via Auth0 you can use the following URL:

https://auth0.com/docs/universal-login

client_id=your-auth0-app-clientId

&response_type=code

&audience=your-audience

&scope=openid%20profile%20offline_access

&redirect_uri=your-auth0-app-allowed-callback-url

&state=some-random-string

&code_challenge_method=your-code-challenge-method (i.e. S256)

&code_challenge=your-code-challenge

MS GRAPH Admin Consent Request

This may be useful if you are planning to use admin consent workflow when users log in and need to request permission for the app to access their MS Graph profile.

https://login.microsoftonline.com/your-tenant-id/oauth2/authorize?

client_id=your-app-registration-client-id

&response_type=code

&redirect_uri=your-app-registration-client-id

 &resource=https://graph.microsoft.com

&prompt=admin_consent

Nick McKenna
Since 2004, Nick McKenna, BSc, MBCS Biography has been the CEO of McKenna Consultants. McKenna Consultants is a bespoke software development based in North Yorkshire, specialising in Cloud development, mobile App development, progressive web App development, systems integration and the Internet of Things development. Nick also holds a First Class Degree in Computer Science (BSc) and wrote his first computer program at the age of nine, on a BBC Micro Model B computer. For the last 21 years, Nick has been a professional computer programmer and software architecture. Nick’s technical expertise includes; Net Core, C#, Microsoft Azure, Asp.Net, RESTful web services, eProcurement, Swift, iOS mobile development, Java, Android mobile development, C++, Internet Of Things and more. In addition, Nick is experienced in Agile coaching, training and consultancy, applying modern Agile management techniques to marketing and running McKenna Consultants, as well as the development of software for clients. Nick is a Certified Enterprise Coach (Scrum Alliance), SAFe Program Consultant (SAI), Certified LeSS Practitioner (LeSS) and Certified Scrum@Scale Practitioner. Outside the office, Nick is a professional scuba diver and he holds the rank of Black Belt 5th Dan in Karate.