Microsoft Entra ID (formerly Azure AD) Service Principals.service Principal API

The servicePrincipals.servicePrincipal API from Microsoft Entra ID (formerly Azure AD) — 4 operation(s) for serviceprincipals.serviceprincipal.

Business capability
Identity & Access Management BC-620.20

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /servicePrincipals List service principals · List servicePrincipals #
Ask an LLM
“Which enterprise apps and service principals exist in my tenant?”
“Does listing service principals also return agent identity blueprint principals?”
Tell an agent
List all service principals in the tenant.
Find service principals whose name matches {search}.
POST /servicePrincipals Create a service principal · Create servicePrincipal #
Ask an LLM
“How do I create a service principal for an app registration?”
“Can I create an agent identity blueprint principal the same way?”
Tell an agent
Create a service principal for application ID {appId}.
Create a service principal for app {appId} requiring role assignment {appRoleAssignmentRequired}.
GET /servicePrincipals/{servicePrincipal-id} Get a service principal by object ID · Get servicePrincipal #
Ask an LLM
“How can I read a service principal when I have its object ID?”
“What properties and relationships does an enterprise app's service principal expose?”
Tell an agent
Get service principal with object ID {servicePrincipal}.
Show service principal {servicePrincipal} with its {expand} expanded.
PATCH /servicePrincipals/{servicePrincipal-id} Upsert a service principal by object ID · Upsert servicePrincipal #
Ask an LLM
“How do I update a service principal's settings given its object ID?”
“Can I disable sign-in for an enterprise app by its object ID?”
Tell an agent
Set accountEnabled to {accountEnabled} on service principal object {servicePrincipal}.
Add tags {tags} to the service principal with object ID {servicePrincipal}.
DELETE /servicePrincipals/{servicePrincipal-id} Delete a service principal by object ID · Delete servicePrincipal #
Ask an LLM
“Can I delete an enterprise app's service principal using its object ID?”
“Does removing a service principal by object ID also work for agent identity blueprint principals?”
Tell an agent destructive · confirm first
Delete service principal object {servicePrincipal}.
Remove the enterprise app whose service principal object ID is {servicePrincipal}.
GET /servicePrincipals(appId='{appId}') Get a service principal by its app ID · Get servicePrincipal #
Ask an LLM
“Can I look up a service principal using the application (client) ID instead of the object ID?”
“Which service principal belongs to a given client ID?”
Tell an agent
Get the service principal for client ID {appId}.
Look up the enterprise app by application ID {appId}.
PATCH /servicePrincipals(appId='{appId}') Upsert a service principal by its app ID · Upsert servicePrincipal #
Ask an LLM
“Can I create a service principal if missing, or update it, addressed by appId?”
“What's the idempotent way to make sure an app ID has a service principal?”
Tell an agent
Upsert the service principal for client ID {appId}.
Ensure application ID {appId} has a service principal with display name {displayName}.
DELETE /servicePrincipals(appId='{appId}') Delete a service principal by its app ID · Delete servicePrincipal #
Ask an LLM
“Can I delete a service principal knowing only its application client ID?”
“Is there a way to remove an enterprise app by appId rather than object ID?”
Tell an agent destructive · confirm first
Delete the service principal for client ID {appId}.
Remove the enterprise app tied to application ID {appId}.
GET /servicePrincipals/$count Count service principals · Get the number of the resource #
Ask an LLM
“How many service principals does my tenant have?”
“Can I count only the service principals that match a filter?”
Tell an agent
Count the service principals in the directory.
Tell me how many service principals match {filter}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/azure-ad:azure-ad-serviceprincipals-serviceprincipal-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

azure-ad-serviceprincipals-serviceprincipal-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Applications Service Principals.service Principal API
  version: v1.0
servers:
- url: https://graph.microsoft.com/v1.0/
  description: Core
security:
- azureaadv2: []
tags:


# --- truncated at 32 KB (111 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/azure-ad/refs/heads/main/openapi/azure-ad-serviceprincipals-serviceprincipal-api-openapi.yml