entrabot: Skill for Claude Code

.claude/skills/implement-agent-id/SKILL.md

implement-agent-id is a skill for Claude Code from microsoft/entrabot. It costs 45 tokens per session (1,811 once invoked), scanned A, original, MIT.

A guide for building integrations with Microsoft Entra Agent ID and Agent User, Microsoft's identity systems for software agents. It covers authentication, permissions, identity creation, and the flow used to obtain user-linked tokens.

In plain words
What is it for?
It is for implementing certificate-based authentication, creating agent identities and users, granting consent, and handling the three-step user-linked token flow.
Why use it?
It keeps identity implementations aligned with the documented object relationships, API versions, permissions, and authentication constraints.

Skill for Claude Code ✓ vendor

Written for Claude Code: installed under .claude/.

This is microsoft/entrabot's own configuration. It tells Claude Code how to work on entrabot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything entrabot configures →

About the project

microsoft/entrabot is a device-local Model Context Protocol server that gives an AI agent its own identity and user account in Microsoft Entra, allowing actions such as sending Teams messages, using email, accessing Microsoft 365 files, and recording audit events under the agent’s identity. It is a reference implementation for agents running with Microsoft 365 services on macOS, Linux, or Windows, and the catalogue entries support configuring and operating it.

microsoft/entrabot · 12 stars · on GitHub · microsoft.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to microsoft/entrabot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/microsoft/entrabot/main/.claude/skills/implement-agent-id/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/microsoft/entrabot

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for implement-agent-id

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/entrabot/implement-agent-id/github.svg)](https://agentmods.dev/skills/microsoft/entrabot/implement-agent-id)
Your own site
<a href="https://agentmods.dev/skills/microsoft/entrabot/implement-agent-id"><img src="https://agentmods.dev/badge/skills/microsoft/entrabot/implement-agent-id/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for implement-agent-id

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/entrabot/implement-agent-id"><img src="https://agentmods.dev/badge/skills/microsoft/entrabot/implement-agent-id.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,811 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01811
Opus 5.5 $0.00018 $0.00724
Sonnet 5.5 $0.00009 $0.00362
Haiku 4.5 $0.00005 $0.00181

Measured 1mo ago against content hash 0375afc3cf3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

implement-agent-id scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
.claude/skills/implement-agent-id/SKILL.md · 218 lines

How it starts

The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Implementing Microsoft Entra Agent ID

Read these repository sources before changing identity or token code:

  • docs/platform-docs/agent-id-blueprints-and-users.md
  • docs/platform-docs/entra-agent-users.md
  • docs/platform-docs/delegated-auth.md
  • docs/reference/token-flows.md
  • engineering-history/research/hard-won-learnings.md

Microsoft Entra Agent ID and Microsoft Agent 365 reached GA on 2026-05-01, but not every related API is on Microsoft Graph v1.0. Use the endpoint version documented for each object rather than treating the whole surface as beta or stable.

Object model

Agent Identity Blueprint (application)
  └─ AgentIdentityBlueprintPrincipal (service principal; create explicitly)
      ├─ Agent Identity (service principal)
      └─ Agent Identity (service principal)
           └─ Agent User (user; linked through user_fic)

An Agent Identity is a service principal, not a user. Do not create a password-backed fake user to represent an agent.

Non-negotiable constraints

Use a dedicated provisioner identity

Azure CLI user tokens contain Directory.AccessAsUser.All; Agent Identity APIs reject those tokens with a hard 403. Use Azure CLI only to bootstrap the dedicated provisioner app and identify the signed-in sponsor.

The provisioner authenticates with a certificate credential. Keep the private key in the OS credential store and purge legacy password credentials. Entrabot implements this in:

  • scripts/entra_provisioning.py
  • scripts/create_entra_agent_ids.py

Do not add a client secret fallback.

Parse Azure CLI output as JSON

CLI warnings can corrupt TSV output. Request JSON and parse the id field:

result = subprocess.run(
    ["az", "ad", "signed-in-user", "show", "-o", "json"],
    check=True,
    capture_output=True,
    text=True,
)
user_id = json.loads(result.stdout)["id"]

Sponsors are user references

Blueprint and Agent Identity creation require at least one sponsor. Bind a Microsoft Graph v1.0 user reference:

Read the full file on GitHub · 218 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 218 lines · 45 tokens per session scan A 0375afc3cf3a

Subscribe to this mod's changes

implement-agent-id is a skill published in the GitHub repository microsoft/entrabot (12 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 1,811 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agents-sdk-dotnet-activityhandler-migration

Use when migrating a Microsoft 365 Agents SDK agent that uses ActivityHandler or TeamsActivityHandler to AgentApplication. This is ONLY for DotNet projects that uses Microsoft.Agents. packages. Triggered by Agents SDK bots that subclass ActivityHandler or TeamsActivityHandler that need to be modernized to…

microsoft/Agents · 76 tokens

agents-sdk-python-otel

Use when adding, configuring, validating, or troubleshooting OpenTelemetry observability for a Microsoft 365 Agents SDK application in Python. Trigger when the user mentions OpenTelemetry, OTel, telemetry, traces, metrics, logs, OTLP, Aspire Dashboard, Application Insights, Azure Monitor, distributed tracing, custom…

microsoft/Agents · 81 tokens

agents-sdk-dotnet

Use when any code imports Microsoft.Agents.Hosting.AspNetCore, Microsoft.Agents.Builder, or related Agents SDK packages, or when the user is building, configuring, or asking questions about a Microsoft 365 Agents SDK agent in C# / .NET. Trigger on questions about appsettings.json, connection configuration…

microsoft/Agents · 112 tokens

bf-to-agents-sdk-dotnet-migration

Use when migrating a Bot Framework .NET SDK bot to Microsoft 365 Agents SDK. Triggered by projects that depend on packages: Microsoft.Bot.Builder or Microsoft.Bot.Builder.Integration.AspNet.Core that want to migrate to Agents SDK.

microsoft/Agents · 56 tokens

agents-sdk-provision

Use when provisioning Azure resources for a Microsoft Agents SDK application — including creating an Azure Bot Service resource, setting up Entra app registrations, configuring identity credentials (UserManagedIdentity, FederatedCredentials, or ClientSecret), adding a Teams channel, running Bicep deployments for SSO…

microsoft/Agents · 131 tokens

agents-sdk-typescript-otel

Use when adding, configuring, validating, or troubleshooting OpenTelemetry observability for a Microsoft 365 Agents SDK application in JavaScript or TypeScript. Trigger when the user mentions OpenTelemetry, OTel, telemetry, traces, metrics, logs, OTLP, Aspire Dashboard, Application Insights, Azure Monitor, distributed…

microsoft/Agents · 88 tokens