entra-agent-id

Create and manage OAuth2-capable AI agent identities via Microsoft Graph beta API.

1|Updated May 29, 2026
One-click install
npx skills add https://github.com/memasanz/agent-harness --skill entra-agent-id-memasanz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: entra-agent-id
Source: https://github.com/memasanz/agent-harness/tree/main/.github/skills/entra-agent-id
Command: npx skills add https://github.com/memasanz/agent-harness --skill entra-agent-id-memasanz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires azure-identity, requests, and includes references (resource) components.

What problem does it solve? Provisioning OAuth2-capable identities for AI agents in Microsoft Entra requires navigating a preview-only Graph beta API with non-obvious rules, such as manually creating BlueprintPrincipals, using User objects as sponsors, and avoiding rejected token types like Azure CLI credentials. ## Core Features & Use Cases - Agent Identity Provisioning: Create Agent Identity Blueprints, BlueprintPrincipals, and Agent Identities through the Microsoft Graph beta API using PowerShell or Python. - Production Authentication Patterns: Configure Managed Identity with Workload Identity Federation for production, or client secrets for local development token flows. - Polyglot Sidecar Integration: Deploy the Microsoft Entra SDK for AgentID container sidecar so agents in any language acquire tokens over HTTP in Docker or Kubernetes. - Use Case: You are building a third-party autonomous agent that must call Microsoft Graph. Use this Skill to provision the Blueprint and Agent Identity, configure a Federated Identity Credential, and wire the auth sidecar into your Kubernetes pod. ## Quick Start Use the entra-agent-id skill to create an Agent Identity Blueprint, its BlueprintPrincipal, and one Agent Identity in my tenant. ## Quick Start Ask the agent to provision an Entra Agent Identity Blueprint and BlueprintPrincipal for your agent project using the Microsoft Graph beta API.

Frequently Asked Questions about entra-agent-id

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Microsoft Entra Agent Identity with Microsoft Graph?

Create an Agent Identity Blueprint via POST /applications, then explicitly create its BlueprintPrincipal via POST /servicePrincipals, then create Agent Identities via POST /servicePrincipals with the agentIdentityBlueprintId. All calls use the Graph beta endpoint with an OData-Version 4.0 header.

Why does Agent Identity creation fail with Blueprint Principal does not exist?

Creating a Blueprint does not auto-create its service principal. You must explicitly POST an AgentIdentityBlueprintPrincipal to /servicePrincipals after Blueprint creation, and implement idempotent checks since a prior run may have created only the Blueprint.

Can I use DefaultAzureCredential or Azure CLI tokens for Agent ID APIs?

No. Azure CLI tokens contain Directory.AccessAsUser.All, which Agent Identity APIs hard-reject with 403. Use a dedicated app registration with client_credentials flow, or Connect-MgGraph with explicit delegated Agent Identity scopes.

How do AI agents authenticate in production with Entra Agent ID?

Production agents use Managed Identity with Workload Identity Federation: create a Federated Identity Credential on the Blueprint with the managed identity's principalId as subject, then acquire tokens for api://{blueprint-app-id}/.default. Client secrets are for local development only.

What is the Microsoft Entra SDK for AgentID sidecar used for?

It is a containerized companion service that handles token acquisition over HTTP, letting agents in any language get autonomous or delegated tokens without embedding an SDK. It runs as a localhost-only sidecar in Docker Compose or Kubernetes pods.

What are the limitations of Entra Agent ID preview?

All endpoints are beta-only, sponsors must be User objects, agent identities cannot hold password credentials, and there is no admin center UI for blueprints. Permission propagation takes 30-120 seconds, and sequential creation calls may need retry with backoff.