Azure Active Directory is a great product and is invaluable in the  enterprise space. In this article we'll be setting it up to provide  tokens for the OAuth2 client credentials grant. This authorization flow  is useful when you want to authorize server-to-server communication that  might not be on behalf of a user.   This diagram, by Microsoft, shows the client credentials grant flow.    From Microsoft documentation    The flow goes like this:   The client sends a request to Azure AD for a token  Azure AD verifies the attached authentication information and issues an access token  The client calls the API with the access token. The API server is  able to verify the validity of the token and therefore the identity of  the client.  The API responds to the client    Setting up Azure AD as an OAuth2 identity provider  The first step is to create applications in your AD for both your API server and the client. You can find step-by-step instructions on how to register the applications o...