> ## 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.

# Microsoft Entra ID OAuth 2.0 (Multiple Companies) connector profile – StackOne setup guide

> Set up a connector profile using OAuth 2.0 (Multiple Companies) for Microsoft Entra ID in StackOne to allow users to link their accounts.

> [!WARNING]
>
> You must have at least Application Developer permissions in your Azure account to register applications in Microsoft Entra ID. A Global Administrator must grant admin consent for the required directory permissions.

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 your application in Microsoft Entra ID

An app registration in Microsoft Entra ID holds the OAuth 2.0 credentials and the Microsoft Graph permissions for the integration.

**1. Create the app registration**

Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com).

<ul>
  <li>If you have access to multiple tenants, click the **Settings** (gear) icon in the top-right corner.</li>
  <li>Select the tenant you want from the list under **Directory + subscription**.</li>
  <li>From the left sidebar, go to **App registrations**.</li>
  <li>Click **New registration**.</li>
  <li>**Name**: A name that identifies this integration</li>
  <li>**Supported account types**: **Accounts in any organizational directory** for multi-tenant access, or **Accounts in this organizational directory only** for single-tenant</li>
  <li>**Redirect URI (optional)**: select **Web**, then enter the **Callback URL** from your Connector Profile</li>
  <li>Select **Register** to create the app registration.</li>
</ul>

**2. Copy the Client ID**

The application's **Overview** page opens after registration.

<ul>
  <li>Copy the **Application (client) ID** to **Client ID** in your Connector Profile.</li>
</ul>

**3. Add the delegated 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 Device, 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**.\
\
**Webhook events**: `Group.Read.All` enables subscribing to group change notifications.

<ul>
  <li>Click **Add a permission**.</li>
  <li>Select **Microsoft Graph**.</li>
  <li>Select **Delegated permissions**.</li>
  <li>Enable each scope listed.</li>
  <li>Click **Add permissions**.</li>
</ul>

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

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

  <li>
    Group.Read.All
  </li>

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

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

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

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

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

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

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

  <li>
    AppRoleAssignment.ReadWrite.All
  </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>
    Directory.AccessAsUser.All
  </li>

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

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

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

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

**4. Grant admin consent**

Consent approves the delegated permissions for every user in your tenant.

<ul>
  <li>Click **Grant admin consent for \[tenant name]**.</li>
  <li>Select **Yes** to consent on behalf of all users in your tenant.</li>
  <li>Verify that **Granted for \[tenant name]** appears under the **Status** column.</li>
</ul>

**5. Create the client secret**

From the left menu under **Manage**, select **Certificates & secrets**.

<ul>
  <li>Under the **Client secrets** tab, click **New client secret**.</li>
  <li>**Description**: A description of what the secret is for</li>
  <li>**Expires**: An expiration period for the secret</li>
  <li>Click **Add**.</li>
</ul>

**6. Copy the Client Secret**

The new client secret appears in the **Client secrets** list.

<ul>
  <li>Copy the **Value** to **Client Secret** in your Connector Profile.</li>
</ul>

## Create the StackOne Connector Profile

**1. Create a Connector Profile**

Enable the connector and create a Connector Profile in your project. See [Setup Connector Profile](https://docs.stackone.com/gateway/quickstart.md#setup-connector-profile).

**2. Link an Account**

Once the Connector Profile is created, continue to [link an account](https://docs.stackone.com/connectors/microsoftentraid/guides/link-account/oauth-2-0-multiple-companies.md).


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