Guide · Agent skill
How to use the Entra Agent User Setup agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The entra-agent-user skill is a set of instructions that tells an AI agent how to create an agent user in Microsoft Entra ID, Microsoft's identity service. It is aimed at developers building agents that must work inside Microsoft 365 or Teams, and at administrators provisioning identities for them. After this guide you will know what the skill does, how to install it, what your tenant needs before it will work, and how to ask for it in plain language.
Quick start
- 1Confirm your tenant and agent identity. Check that your Entra tenant has Agent ID capabilities and that your agent identity was created from an agent identity blueprint. Verify its type is agentIdentity with a GET to the beta servicePrincipals endpoint.
- 2Install the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or your project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Ask for an agent user in plain language. Describe the outcome, including the agent identity object ID, display name and UPN domain you want.
- 4Create the agent user. The agent sends a POST to the agentUser endpoint with accountEnabled, displayName, mailNickname, userPrincipalName and identityParentId.
- 5Add a manager, usage location and licenses if needed. Optionally assign a manager with a PUT to manager/$ref, then set usageLocation and assign a license for mailbox or Teams access.
- 6Wait for provisioning and review. Allow time for mailboxes, Teams and org chart entries to appear, and review permissions before the agent uses the account.
What is an agent skill and what does this one do?
An agent skill is a folder containing a SKILL.md file. The file gives an AI agent step-by-step instructions for one task, and the agent loads it when a request matches the skill's description. This skill covers one task: creating an agent user for an existing agent identity.
An agent user is a user-type account in Microsoft Entra ID. It lets an AI agent act like a digital worker for services that normally require a real user login, such as Exchange mailboxes, Teams, or org charts. Agent users receive tokens with idtyp=user, while regular agent identities receive idtyp=app.
- Verifies that the parent agent identity is a true agent identity created from an agent identity blueprint
- Creates the agent user through Microsoft Graph (beta endpoints)
- Optionally assigns a manager so the agent appears in org charts
- Optionally sets a usage location and assigns licenses for a mailbox or Teams presence
What do you need before you install it?
The skill only works in a Microsoft Entra tenant that has Agent ID capabilities. You also need an agent identity (a service principal of type ServiceIdentity) created from an agent identity blueprint. A regular app registration will not work.
You need Microsoft Graph permissions such as AgentIdUser.ReadWrite.IdentityParentedBy (the least privileged option), User.ReadWrite.All, or Organization.Read.All for license lookups. In delegated scenarios the caller needs at least the Agent ID Administrator role. The PowerShell examples use the Microsoft Graph PowerShell module (Connect-MgGraph and Invoke-MgGraphRequest). Microsoft 365 licenses are needed only if the agent user needs a mailbox or Teams presence.
How do you install the skill?
Download the ZIP for this skill from this page and unzip it. For a personal install, place the skill folder in ~/.claude/skills/. For a single project, place it in the project's .claude/skills/ folder.
You can also upload the skill in the Claude apps under Settings → Capabilities → Skills.
- Personal: ~/.claude/skills/entra-agent-user/
- Project: .claude/skills/entra-agent-user/
- Claude apps: Settings → Capabilities → Skills
How do you trigger the skill with a natural request?
You do not need to type the skill name. Describe the outcome you want in plain language that matches the skill's purpose, such as creating an agent user for an agent identity or giving an agent a mailbox. The agent will load the skill when the request matches its description.
Include the details the steps require: the tenant, the agent identity object ID, the display name you want, and the UPN domain. If you want a manager or license, say so.
- Create an agent user for my agent identity <object-id> in my Entra tenant, display name 'Invoice Agent'.
- Set up an Entra agent user so my agent can read Exchange mailboxes.
- Assign a manager and a Microsoft 365 license to the agent user I just created.
What does the process look like?
The skill follows four steps. First it checks the agent identity with a GET request to the beta servicePrincipals endpoint and confirms the type is agentIdentity. Then it creates the agent user with a POST to the users/microsoft.graph.agentUser endpoint, using accountEnabled, displayName, mailNickname, userPrincipalName and identityParentId.
Manager assignment and usage location with license assignment are optional. Usage location must be set before a license can be assigned. Keep in mind that provisioning can take from minutes to a day or more, depending on the service.
- Step 1: Verify the agent identity
- Step 2: Create the agent user (no password is set; agent users cannot have passwords)
- Step 3: Assign a manager (optional)
- Step 4: Set usage location and assign licenses (optional)
POST https://graph.microsoft.com/beta/users/microsoft.graph.agentUserWhat are the safety notes?
This skill uses the network: it sends requests to Microsoft Graph. It does not run scripts itself, but its examples use PowerShell commands that you run. Creating an agent user creates an account that can hold licenses and access mail and organisational data, so treat it as a security-sensitive action.
Agent users cannot have passwords, passkeys or interactive sign-in, cannot be assigned privileged admin roles, and cannot be added to role-assignable groups. Review the request and the permissions before you approve it, and do not use this skill in production without a review.
- Use the least privileged permission that works, such as AgentIdUser.ReadWrite.IdentityParentedBy
- Check the identityParentId carefully; it must reference a true agent identity
- Do not reuse an existing user's userPrincipalName
What tips help avoid common errors?
Most failures come from the wrong ID type. If you use an app registration's appId or a regular application service principal's id, the request fails. Each agent identity can have only one agent user; a second create attempt returns 400 Bad Request.
If a mailbox, Teams or org chart entry is missing right after setup, wait. The source lists Exchange mailboxes at 5 to 30 minutes, Teams at 15 minutes to 24 hours, and org chart or People search at up to 24 to 48 hours.
- Use Connect-MgGraph with the scopes you need before running requests
- Set usageLocation before assigning a license
- You can also assign licenses in the Entra admin center under Identity → Users → All users
What people use it for
- Giving an AI agent a mailbox and calendar so it can read or send mail through Exchange
- Letting an agent take part in Teams chats and channels
- Showing an agent in the org chart under a named manager
- Adding an agent user to Entra groups or administrative units for access control
Frequently asked questions
How do I install the entra-agent-user skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings → Capabilities → Skills.
What do I need to use the entra-agent-user skill?
You need a Microsoft Entra tenant with Agent ID capabilities, an agent identity created from an agent identity blueprint, and suitable Microsoft Graph permissions. Microsoft 365 licenses are only needed if the agent user needs a mailbox or Teams presence.
Is the entra-agent-user skill free?
The skill is released under the MIT licence. The source does not state any pricing, but using Microsoft Entra and Microsoft 365 requires your own Microsoft tenant and licences.
Why does creating the agent user fail?
The most common cause is an identityParentId that does not point to a true agent identity. Regular application service principals and app registration appId values will fail. Also check that the UPN is unique and that you have the required permissions and role.
Can an agent user have a password?
No. Agent users cannot have passwords, passkeys or interactive sign-in. They authenticate through their parent agent identity's credentials.
Does this skill work outside Microsoft?
No. The skill is specific to Microsoft Entra and Microsoft Graph beta endpoints, so it is not a general-purpose or non-Microsoft identity tool.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits developers and Microsoft 365 or Entra administrators who are building agents that must work inside Microsoft 365 or Teams, and who already have Agent ID set up. Skip it if you do not have an Entra tenant with Agent ID features, or if you need a general-purpose agent or non-Microsoft identity setup. Because it creates accounts with licences and access to mail and org data, review every step before using it in production.
Download the skill