> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Microsoft Entra ID with OAuth 2.0 (Client Credentials) – StackOne Hub

> Link a Microsoft Entra ID account in the StackOne Hub using OAuth 2.0 (Client Credentials). End-user guide to authorize the integration and start using Microsoft Entra ID actions.

> [!WARNING]
>
> Registering the application needs at least the Application Developer role in Microsoft Entra ID, and granting admin consent needs a Global Administrator or Privileged Role Administrator. Microsoft Graph supports the device write operations only with a signed-in user, so the actions that create devices are unavailable with this authentication type.

Select Actions to adjust the guideSome actions may require additional configuration in the provider to be accessible. Choose the actions you need and the guide will be updated.

Select all
Clear

ActionScope(s)

Loading actions...No actions match your search.

Dynamic Guide URL

Copy URL

Scopes Selected

<pre role="textbox" aria-readonly="true" tabIndex="0" />

Separator

Copy scopes

## Register an application in Microsoft Entra ID

An app registration in Microsoft Entra ID holds the credentials and the Microsoft Graph application permissions for the directory. Application permissions apply without a signed-in user, so no redirect URI is needed.

**1. Create the app registration**

Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com), then open **Entra ID** > **App registrations**.

<ul>
  <li>Click **New registration**.</li>
  <li>**Name**: `StackOne Integration`</li>
  <li>**Supported account types**: **Single tenant only**</li>
  <li>Leave **Redirect URI (optional)** empty.</li>
  <li>Click **Register**.</li>
</ul>

![The Register an application form with the Name field, the Supported account types dropdown and the Register button highlighted](https://mintcdn.com/stackone-60/KeR9q7rSgt6LoSi6/connectors/microsoftentraid/images/client-credentials-config-register-application.png?fit=max\&auto=format\&n=KeR9q7rSgt6LoSi6\&q=85\&s=0ab9afb838f92225f7c2a863a2a35274)

## Add the Microsoft Graph application permissions

Application permissions are granted to the application itself rather than to a user, so an administrator consents to them once and they apply across the tenant.

**1. Select the permissions**

Enables actions: Add App Role Assignment To Service Principal, Add Directory Role Member, Add Group Member, Assign App Role To User, Create Application, Create Conditional Access Policy, Create Country Named Location, Create Domain, Create Group, Create IP Named Location, Create OAuth2 Permission Grant, Create Service Principal, Create User, Delete Application, Delete Conditional Access Policy, Delete Device, Delete Domain, Delete Group, Delete Named Location, Delete OAuth2 Permission Grant, Delete Service Principal, Delete User, Get Application, Get Conditional Access Policy, Get Device, Get Directory Role, Get Domain, Get Group, Get Named Location, Get OAuth2 Permission Grant, Get Organization, Get Service Principal, Get User, List Applications, List Conditional Access Policies, List Device Group Memberships, List Device Registered Owners, List Device Registered Users, List Devices, List Directory Role Members, List Directory Roles, List Domain Service Configuration Records, List Domain Verification DNS Records, List Domains, List Group Members, List Groups, List Named Locations, List OAuth2 Permission Grants, List Organizations, List Role Templates, List Service Principal App Role Assignments, List Service Principals, List User App Role Assignments, List Users, Remove App Role Assignment From Service Principal, Remove App Role From User, Remove Directory Role Member, Remove Group Member, Update Application, Update Conditional Access Policy, Update Device, Update Group, Update OAuth2 Permission Grant, Update Organization, Update Service Principal, Update User, Verify Domain

From the left menu under **Manage**, select **API permissions**.

<ul>
  <li>Click **Add a permission**.</li>
  <li>Select **Microsoft Graph**.</li>
  <li>Select **Application permissions**.</li>
  <li>Under **Select permissions**, filter the catalog and select the checkbox beside each permission.</li>
  <li>Click **Add permissions**.</li>
</ul>

![The Select permissions list filtered to User.Read.All with its checkbox and the Add permissions button highlighted](https://mintcdn.com/stackone-60/KeR9q7rSgt6LoSi6/connectors/microsoftentraid/images/client-credentials-config-select-permissions.png?fit=max\&auto=format\&n=KeR9q7rSgt6LoSi6\&q=85\&s=ec02bc71739e2961ffa2d5c6bbf46ffb)

<ul>
  <li>
    User.Read.All
  </li>

  <li>
    User.ReadWrite.All
  </li>

  <li>
    Group.ReadWrite.All
  </li>

  <li>
    GroupMember.Read.All
  </li>

  <li>
    GroupMember.ReadWrite.All
  </li>

  <li>
    Organization.Read.All
  </li>

  <li>
    Organization.ReadWrite.All
  </li>

  <li>
    Application.Read.All
  </li>

  <li>
    Application.ReadWrite.All
  </li>

  <li>
    RoleManagement.Read.Directory
  </li>

  <li>
    RoleManagement.ReadWrite.Directory
  </li>

  <li>
    Policy.Read.All
  </li>

  <li>
    Policy.ReadWrite.ConditionalAccess
  </li>

  <li>
    Domain.Read.All
  </li>

  <li>
    Domain.ReadWrite.All
  </li>

  <li>
    Device.Read.All
  </li>

  <li>
    Device.ReadWrite.All
  </li>

  <li>
    Directory.Read.All
  </li>

  <li>
    DelegatedPermissionGrant.ReadWrite.All
  </li>

  <li>
    AppRoleAssignment.ReadWrite.All
  </li>
</ul>

**2. Grant admin consent**

Application permissions take effect only once an administrator consents to them, which is why the **Status** column reads **Not granted for \[tenant name]** until then.

<ul>
  <li>Click **Grant admin consent for \[tenant name]**.</li>
  <li>Click **Yes** on **Grant admin consent confirmation**.</li>
  <li>Check that the **Status** column reads **Granted for \[tenant name]** for every permission.</li>
</ul>

![The Configured permissions table with the Grant admin consent button highlighted](https://mintcdn.com/stackone-60/KeR9q7rSgt6LoSi6/connectors/microsoftentraid/images/client-credentials-config-grant-admin-consent.png?fit=max\&auto=format\&n=KeR9q7rSgt6LoSi6\&q=85\&s=b2b7daa62c9d621caeb2289793a8b797)

## Copy the credentials

The application identifies itself with three values from the registration — two on the **Overview** page and a secret you create.

**1. Copy the Client ID and Tenant ID**

From the left menu, select **Overview**, then copy both values across.

<ul>
  <li>**Client ID**: the **Application (client) ID**</li>
  <li>**Tenant ID**: the **Directory (tenant) ID**</li>
</ul>

![The application Overview page with the Application (client) ID and Directory (tenant) ID values highlighted](https://mintcdn.com/stackone-60/KeR9q7rSgt6LoSi6/connectors/microsoftentraid/images/client-credentials-config-overview-ids.png?fit=max\&auto=format\&n=KeR9q7rSgt6LoSi6\&q=85\&s=9d413c71d865ec496bc903122b4241c0)

**2. Create a client secret**

From the left menu under **Manage**, select **Certificates & secrets**, then open the **Client secrets** tab.

<ul>
  <li>Click **New client secret**.</li>
  <li>**Description**: `Integration with StackOne`</li>
  <li>**Expires**: how long the secret stays valid</li>
  <li>Click **Add**.</li>
</ul>

![The Add a client secret pane with the Description field, the Expires dropdown and the Add button highlighted](https://mintcdn.com/stackone-60/KeR9q7rSgt6LoSi6/connectors/microsoftentraid/images/client-credentials-config-new-client-secret.png?fit=max\&auto=format\&n=KeR9q7rSgt6LoSi6\&q=85\&s=67a9122054ab16d2b088d17203db1047)

**3. Copy the Client Secret**

Copy the **Value** of the new secret across.

<ul>
  <li>The **Value** is only displayed when the secret is created and cannot be retrieved later.</li>
</ul>

![The Client secrets table with the copy button beside the secret Value highlighted](https://mintcdn.com/stackone-60/KeR9q7rSgt6LoSi6/connectors/microsoftentraid/images/client-credentials-config-client-secret-value.png?fit=max\&auto=format\&n=KeR9q7rSgt6LoSi6\&q=85\&s=0167e324fb7a651e5bb42ece910953f7)

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).

## Next Steps

> [card] [Webhooks setup](https://docs.stackone.com/connectors/microsoftentraid/guides/webhook-setup.md)
>
> Configure receiving Events for Microsoft Entra ID into StackOne.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.