Following my previous posts explaining OAuth2 & this one where I explained the concept of Azure App Registration.
Now it is time to show how to set up an App Registration in Azure practically:
Navigate to Azure Portal: https://portal.azure.com
Search for App registration and click on App registrations as shown below:
3. On the App Registrations page, click on “New Registration”
4. Fill in the form and Click on Register as shown below:
5. The steps that follow are only necessary if the APIs or resource that you want to access requires some specific permissions to be assigned to the service principal. Otherwise click Register. On the App Registration page, from the left menu, navigate to Manage > API permissions to see more permissions.
6. Select the specific permission that needs to be granted to the application example: “User_Impersonation” checkbox and click “Add Permission”
7. Next is to grant admin consent, navigate to API Permissions again and click on the “Grant admin consent for {tenant}” and click on Yes in the dialog box.
8. Finally We must create credentials that the App will use to authenticate, it could be a certificate or client secret. In this case, we will create a client secret as it is the most commonly used. Navigate to Manage > Certificates & Secrets and click on “New client secret”. Give it a descriptive name and set the validity period as shown below:
9. In the page that follows, make sure you copy the client secret Value as it will be shown only once because it is highly confidential information.
10. Take note of these additional details that will be used for authentication. Navigate to the Overview Page to copy the following in a notepad:
Application (client) ID
Directory (tenant) ID
That’s all you need to set up an app registration that can authenticate against the Azure AD/Microsoft Entra ID and can be referenced from code or postman.