Set up OAuth 2.0 using client credentials

To set up OAuth 2.0 to use client credentials, you must register your Azure Active Directory application.

To register your Azure Active Directory application with the Microsoft identity platform, perform the following steps.

Procedure

  1. Log in to the Microsoft Azure portal.
    Azure portal login page
    Note: Enter your complete email address including the domain (for example, abc@domain.com).
  2. On the Home page, click View under the Manage Azure Active Directory option.
  3. On the Overview page, select App registrations from the Manage panel and then click + New registrationRegistering an application for Client Credentials.
  4. On the Register an application page, enter the appropriate name in the Name field, then select the account type and click Register.
    Note: You do not need to enter the Redirect URL because it is not required for the Client Credential flow.
  5. To set the API permission for the application to access the API resources, select the API permissions option under the Manage panel.
  6. Click + Add a permission > Microsoft APIs and select Microsoft Graph.
    Grant API permission screen
  7. Select Application permissions and perform the following steps:
    1. Search with Mail in the Select permissions search box and expand the Mail option.
    2. Select the Mail.ReadWrite and Mail.Send API permissions check boxes.
    3. Click Add permissions.
  8. Click Yes to grant permission to use the API.
  9. To create a client secret, click Certificates and secrets option under the Manage panel.
    1. Click +New client secret to open the Add a client secret window.
    2. Enter an appropriate description in the Description field and set the expiry duration.
    3. Click Add.
      Adding Client secret
    4. Copy and save the Client secret value to a safe location for your reference. We recommend that you do not share the value with anyone.
      Copy the value of the Client secret
  10. After an application is registered, the application is assigned with the Client ID and Tenant ID. You can click Copy to clipboard to copy the tenant and the client IDs.
    Copy Client ID and Tenant ID
    You can use the Client ID, Tenant ID, and Client secret to establish a connection with a Microsoft 365 Outlook server.
    Note: If the mailbox is used inside a Loop action, ensure that you register the user who is assigned to perform the automation. For more information , see Manage users and groups assignment to an application.