Microsoft Entra Agent ID
Authentication

Get the service principal for Microsoft Graph

In brief

The documentation replaces inconsistent tenant placeholders with `<your-tenant-id>` and standardizes `<agent-blueprint-clientid>` to `<agent-blueprint-client-id>` in code samples.

What Entra admins need to know

Administrators using these examples should use the updated placeholder names when substituting their tenant and agent blueprint client IDs. No product or behavior change is indicated.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

"AzureAd": { "Instance": "https://login.microsoftonline.com/", "TenantId": "", "ClientId": "", "ClientCredentials": [ { "SourceType": "SignedAssertionFromManagedIdentity", "AzureAd": { "Instance": "https://login.microsoftonline.com/", "ClientCredentials": [ { "SourceType": "SignedAssertionFromManagedIdentity", "AzureAd": { "Instance": "https://login.microsoftonline.com/", "TenantId": "", "ClientId": "", "ClientCredentials": [ { "SourceType": "ClientSecret", Use the following token request to obtain a token for the agent identity blueprint:

POST https://login.microsoftonline.com/<my-test-tenant>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=<agent-blueprint-client-id>
Once you have the agent identity blueprint token (T1), use it to request the agent identity token.

```http
POST https://login.microsoftonline.com/<my-test-tenant>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=<agent-identity-client-id>
    #### [Microsoft Graph PowerShell](#tab/microsoft-graph-powershell)

    ```powershell
    Connect-MgGraph -Scopes "Application.Read.All AppRoleAssignment.ReadWrite.All" -TenantId <your-test-tenant>

    # Get the service principal for Microsoft Graph (well-known app ID)
    $graphSp = Get-MgServicePrincipal -Filter "appId eq '00000003-0000-0000-c000-000000000000'"
    {
      "AzureAd": {
        "Instance": "https://login.microsoftonline.com/",
        "TenantId": "<my-test-tenant>",
        "ClientId": "<my-agent-blueprint-id>",
        "Scopes": "access_agent",
        "ClientCredentials": [
For Microsoft Graph PowerShell, use the following script:

```powershell
Connect-MgGraph -Scopes "DelegatedPermissionGrant.ReadWrite.All" -TenantId <your-test-tenant>

# Get the service principal for Microsoft Graph
$graphSp = Get-MgServicePrincipal -Filter "appId eq '00000003-0000-0000-c000-000000000000'"
First, request a token as the agent identity blueprint, as described in [Request a token for the agent identity blueprint](#request-a-token-for-the-agent-identity-blueprint). Once you have the agent identity blueprint token, use the agent identity blueprint token to request a Federated Identity Credential (FIC) for your agent identity:

```http
POST https://login.microsoftonline.com/<my-test-tenant>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=<agent-identity-id>
This returns an exchange token (T2) for the agent identity. Use it in the next request to obtain a delegated token for the agent's user account:

```http
POST https://login.microsoftonline.com/<my-test-tenant>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=<agent-identity-id>
", "ClientCredentials": [ { "SourceType": "ClientSecret", Use the following token request to obtain a token for the agent identity blueprint:

POST https://login.microsoftonline.com/<your-tenant-id>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=<agent-blueprint-client-id>
Once you have the agent identity blueprint token (T1), use it to request the agent identity token.

```http
POST https://login.microsoftonline.com/<your-tenant-id>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=<agent-identity-client-id>
    #### [Microsoft Graph PowerShell](#tab/microsoft-graph-powershell)

    ```powershell
    Connect-MgGraph -Scopes "Application.Read.All AppRoleAssignment.ReadWrite.All" -TenantId <your-tenant-id>

    # Get the service principal for Microsoft Graph (well-known app ID)
    $graphSp = Get-MgServicePrincipal -Filter "appId eq '00000003-0000-0000-c000-000000000000'"
    {
      "AzureAd": {
        "Instance": "https://login.microsoftonline.com/",
        "TenantId": "<your-tenant-id>",
        "ClientId": "<my-agent-blueprint-id>",
        "Scopes": "access_agent",
        "ClientCredentials": [
For Microsoft Graph PowerShell, use the following script:

```powershell
Connect-MgGraph -Scopes "DelegatedPermissionGrant.ReadWrite.All" -TenantId <your-tenant-id>

# Get the service principal for Microsoft Graph
$graphSp = Get-MgServicePrincipal -Filter "appId eq '00000003-0000-0000-c000-000000000000'"
First, request a token as the agent identity blueprint, as described in [Request a token for the agent identity blueprint](#request-a-token-for-the-agent-identity-blueprint). Once you have the agent identity blueprint token, use the agent identity blueprint token to request a Federated Identity Credential (FIC) for your agent identity:

```http
POST https://login.microsoftonline.com/<your-tenant-id>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=<agent-identity-id>
This returns an exchange token (T2) for the agent identity. Use it in the next request to obtain a delegated token for the agent's user account:

```http
POST https://login.microsoftonline.com/<your-tenant-id>/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=<agent-identity-id>
Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…