Aller au contenu
Skillpedia
Automatisations40k · #7190

entra-agent-user

Ce qu’il fait

Cet outil crée des identités d'utilisateur pour les agents IA dans Microsoft Entra ID. Cela permet aux agents IA d'agir comme des travailleurs numériques et d'accéder à des services comme la messagerie et Teams.

Quand l’utiliser

  • ✓Lorsqu'un agent IA doit envoyer des e-mails.
  • ✓Lorsqu'un agent IA doit rejoindre des réunions Teams.
  • ✓Lorsqu'un agent IA doit accéder à des ressources qui exigent une identité d'utilisateur.

Lien du skill

https://github.com/github/awesome-copilot/blob/main/skills/entra-agent-user/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/github/awesome-copilot/blob/main/skills/entra-agent-user/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Crée un utilisateur agent pour mon agent marketing nommé « Marketing Agent » avec le UPN « marketing@mycompany.com », lié à l'identité d'agent « abc-123 ».”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil utilise l'identité d'un agent IA existant pour créer une nouvelle identité d'utilisateur dans Microsoft Entra ID. Cette nouvelle identité reçoit les autorisations nécessaires pour agir comme un employé.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

SKILL: Creating Agent Users in Microsoft Entra Agent ID

Overview

An agent user is a specialized user identity in Microsoft Entra ID that enables AI agents to act as digital workers. It allows agents to access APIs and services that strictly require user identities (e.g., Exchange mailboxes, Teams, org charts), while maintaining appropriate security boundaries.

Agent users receive tokens with idtyp=user, unlike regular agent identities which receive idtyp=app.


Prerequisites

  • A Microsoft Entra tenant with Agent ID capabilities
  • An agent identity (service principal of type ServiceIdentity) created from an agent identity blueprint
  • One of the following permissions:
    • AgentIdUser.ReadWrite.IdentityParentedBy (least privileged)
    • AgentIdUser.ReadWrite.All
    • User.ReadWrite.All
  • The caller must have at minimum the Agent ID Administrator role (in delegated scenarios)

Important: The identityParentId must reference a true agent identity (created via an agent identity blueprint), NOT a regular application service principal. You can verify by checking that the service principal has @odata.type: #microsoft.graph.agentIdentity and servicePrincipalType: ServiceIdentity.


Architecture

Agent Identity Blueprint (application template)
    │
    ├── Agent Identity (service principal - ServiceIdentity)
    │       │
    │       └── Agent User (user - agentUser) ← 1:1 relationship
    │
    └── Agent Identity Blueprint Principal (service principal in tenant)
Component Type Token Claim Purpose
Agent Identity Service Principal idtyp=app Backend/API operations
Agent User User (agentUser) idtyp=user Act as a digital worker in M365

Step 1: Verify the Agent Identity Exists

Before creating an agent user, confirm the agent identity is a proper agentIdentity type:

GET https://graph.microsoft.com/beta/servicePrincipals/{agent-identity-id}
Authorization: Bearer <token>

Verify the response contains:

{
  "@odata.type": "#microsoft.graph.agentIdentity",
  "servicePrincipalType": "ServiceIdentity",
  "agentIdentityBlueprintId": "<blueprint-id>"
}

PowerShell

Connect-MgGraph -Scopes "Application.Read.All" -TenantId "<tenant>" -UseDeviceCode -NoWelcome
Invoke-MgGraphRequest -Method GET `
  -Uri "https://graph.microsoft.com/beta/servicePrincipals/<agent-identity-id>" | ConvertTo-Json -Depth 3

Common mistake: Using an app registration's appId or a regular application service principal's id will fail. Only agent identities created from blueprints work.


Step 2: Create the Agent User

HTTP Request

POST https://graph.microsoft.com/beta/users/microsoft.graph.agentUser
Content-Type: application/json
Authorization: Bearer <token>

{
  "accountEnabled": true,
  "displayName": "My Agent User",
  "mailNickname": "my-agent-user",
  "userPrincipalName": "my-agent-user@yourtenant.onmicrosoft.com",
  "identityParentId": "<agent-identity-object-id>"
}

Required Properties

Property Type Description
accountEnabled Boolean true to enable the account
displayName String Human-friendly name
mailNickname String Mail alias (no spaces/special chars)
userPrincipalName String UPN — must be unique in the tenant (alias@verified-domain)
identityParentId String Object ID of the parent agent identity

PowerShell

Connect-MgGraph -Scopes "User.ReadWrite.All" -TenantId "<tenant>" -UseDeviceCode -NoWelcome

$body = @{
  accountEnabled    = $true
  displayName       = "My Agent User"
  mailNickname      = "my-agent-user"
  userPrincipalName = "my-agent-user@yourtenant.onmicrosoft.com"
  identityParentId  = "<agent-identity-object-id>"
} | ConvertTo-Json

Invoke-MgGraphRequest -Method POST `
  -Uri "https://graph.microsoft.com/beta/users/microsoft.graph.agentUser" `
  -Body $body -ContentType "application/json" | ConvertTo-Json -Depth 3

Key Notes

  • No password — agent users cannot have passwords. They authenticate via their parent agent identity's credentials.
  • 1:1 relationship — each agent identity can have at most one agent user. Attempting to create a second returns 400 Bad Request.
  • The userPrincipalName must be unique. Don't reuse an existing user's UPN.

Step 3: Assign a Manager (Optional)

…

Questions fréquentes

Qu'est-ce qu'un « utilisateur agent » ?

C'est une identité spéciale dans Microsoft Entra ID qui permet à un agent IA d'agir comme un travailleur numérique, avec accès à des ressources comme la messagerie et Teams.

Pourquoi un agent IA a-t-il besoin d'une identité d'utilisateur ?

Certains services de Microsoft 365 exigent une identité d'utilisateur pour l'accès, et pas seulement une identité d'application. Un utilisateur agent permet à l'agent IA de répondre à ces exigences.

Un utilisateur agent peut-il avoir un mot de passe ?

Non, les utilisateurs agents ne peuvent pas avoir de mot de passe. Ils s'authentifient avec les identifiants de leur identité d'agent parente.

Détails

Description originale de l’auteur

Create Agent Users in Microsoft Entra ID from Agent Identities, enabling AI agents to act as digital workers with user identity capabilities in Microsoft 365 and Azure environments.

repo: github/awesome-copilot

Popularité

Étoiles GitHub
40k
Position au classement
#7190
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires