Azure MCP server enterprise setup: OAuth, official server and self-hosting

The official Azure MCP Server signs users in through Entra ID and inherits their Azure RBAC roles, with a documented remote HTTP mode and two azd-based self-hosted templates. This page covers what is built in, what must be configured, and the gaps a reviewer should close.

On this page

Does the Azure MCP server enterprise setup meet our Entra ID and access requirements?

A team that wants AI agents to reach Azure through the official server should first know that Entra ID sign-in and Azure RBAC inheritance are documented for the server, and that remote HTTP hosting is the production path the Authentication guide recommends. The supplied material does not name a separate paid edition of the Azure MCP Server, so confirm licensing and support terms with Microsoft before approving rollout. The server itself is published in the microsoft/mcp repository under an MIT license, which covers the code, not any Azure consumption charges that your subscriptions may incur.

The requirements to configure fall into three areas. First, inbound access: every request to a remote server must carry a valid Entra ID bearer token, using the delegated authorization code flow with the Mcp.Tools.ReadWrite scope or the application client credentials flow with the Mcp.Tools.ReadWrite.All role. Decide which flow each client may use, because an application token cannot be combined with On-Behalf-Of. Second, outbound access: choose between UseOnBehalfOf and UseHostingEnvironmentIdentity through the --outgoing-auth-strategy flag, remembering that On-Behalf-Of is the default when the flag is omitted. Third, RBAC: whichever identity is used, it needs roles on each target resource, such as Storage Blob Data Reader for storage operations, so review the role assignments before granting access.

The gaps sit in the self-hosted path and the STDIO path. The Copilot Studio deployment template provisions a managed identity with the Subscription Reader role, and its prerequisites list Owner or User Access Administrator on the subscription, a privilege level your identity team should review and narrow. If STDIO is unavoidable, set AZURE_TOKEN_CREDENTIALS=prod so the credential chain uses only non-interactive credentials. Ask Microsoft and your own architects to confirm how token lifetimes, consent and conditional access policies apply to your tenant, since the supplied facts do not cover them.

Azure MCP server capabilities: built in, configured or outside components

This table sorts each enterprise setup capability into what the Azure MCP Server provides by default, what your team must configure, and what sits outside the server in Entra ID, Azure RBAC or your own hosting. Use the status column to decide which items need an owner and which need a written confirmation from Microsoft or your own testing before approval.

CapabilityStatusWhat it means for reviewersSource
Entra ID bearer token on inbound requestsBuilt inRemote (HTTP) deployments require a valid Entra ID bearer token on every inbound request.Authentication guide (microsoft/mcp)
Delegated authorization code flow with Mcp.Tools.ReadWriteConfiguredThe user signs in, and the app registration must grant the Mcp.Tools.ReadWrite scope for delegated access.Authentication guide (microsoft/mcp)
Application client credentials with Mcp.Tools.ReadWrite.AllConfiguredAn app-level token needs the Mcp.Tools.ReadWrite.All role, so confirm which apps hold it and who approves them.Authentication guide (microsoft/mcp)
On-Behalf-Of outbound (default)ConfiguredThe server exchanges the user's token for Azure access, so actions follow that user's RBAC roles. Default when the outbound flag is omitted.Authentication guide (microsoft/mcp)
UseHostingEnvironmentIdentity outboundConfiguredThe server uses its hosting identity instead of the user, so access depends on that identity's roles. Set through the outgoing auth strategy flag.Authentication guide (microsoft/mcp)
STDIO with AZURE_TOKEN_CREDENTIALS=prodConfiguredFor STDIO only, this limits the credential chain to non-interactive credentials. Microsoft recommends HTTP transport for production.Authentication guide (microsoft/mcp)
Self-hosted azd deployment for Microsoft Foundry and Copilot StudioConfiguredBoth remote options deploy with the Azure Developer CLI onto Azure Container Apps. Copilot Studio's template adds a managed identity with Subscription Reader and an app registration.Copilot Studio deployment guide (Microsoft Learn)
Azure RBAC enforcementOutside componentAzure RBAC decides what the identity can change on each resource, regardless of the token. Assign least-privilege roles yourself in Azure.Authentication guide (microsoft/mcp); Azure MCP overview
Audit and telemetryNot stated in sourcesSources do not describe audit log content or retention. Ask Microsoft where server logs go and who can read them.Confirm with Microsoft documentation

How the Azure MCP server authenticates users and reaches Azure

Authentication for a remote Azure MCP Server runs in two separate layers. The inbound layer covers the client proving who it is to the server: every request must carry a valid Entra ID bearer token. The outbound layer covers the server calling Azure services on the client's behalf. Reviewers should evaluate both, because a sound inbound setup does not limit what the server can do once it reaches Azure. The Authentication guide in the microsoft/mcp repository describes this split, and it is the first document to read before choosing a flow.

The inbound flow determines whose identity the request carries. The authorization code flow is delegated, so a person signs in and the token carries the Mcp.Tools.ReadWrite scope. The client credentials flow is application-level and needs the Mcp.Tools.ReadWrite.All app role, which means any caller holding that credential can act without a user present. Confirm with the identity team whether that app role is granted to any service principal, and who is allowed to consent to it. On the outbound side, the --outgoing-auth-strategy flag selects UseOnBehalfOf or UseHostingEnvironmentIdentity, and it defaults to On-Behalf-Of when omitted. Under On-Behalf-Of, the server exchanges the user's token for an Azure token, so Azure actions run as that person. Under the hosting environment identity option, the server uses the identity it runs under, so every caller shares one set of Azure permissions.

The guide also states that an application bearer token combined with On-Behalf-Of is not supported, because the token carries no user identity to exchange. Teams that plan unattended agents therefore need to choose the hosting environment identity strategy, or keep a user in the loop. Regardless of the credential or strategy, the identity that reaches Azure still needs Azure RBAC roles on each target resource, for example Storage Blob Data Reader for storage operations. Treat RBAC as the final gate: scope roles to the resource groups and subscriptions the team actually uses, and review them before rollout, because a broad role on the hosting identity will be available to every caller in the shared-identity case.

Inbound and outbound identity in a remote Azure MCP deployment

The diagram starts with a user or client that obtains an Entra ID token and sends it over HTTP to the remote Azure MCP Server. The server first checks the inbound bearer token against the Mcp.Tools.ReadWrite scope (delegated) or the Mcp.Tools.ReadWrite.All role (application). For the outbound hop, the server either exchanges the user's token through On-Behalf-Of or uses its hosting environment managed identity. Azure RBAC then decides whether the resulting identity can act on the target resource. Check each arrow separately, because the two layers are configured and audited independently.

Two identity layers: inbound client token, then outbound identity checked by Azure RBAC.

Design decisions before approving the team setup

Before the Azure MCP Server reaches a team, four access and deployment choices shape who the audit log names, how far the server can reach and how it is hosted. Each card covers one decision, what it changes in Entra ID and Azure, and what the reviewer should confirm before approval.

Delegated or application access

The authorization code flow is delegated: a signed-in user calls the server with the Mcp.Tools.ReadWrite scope, so actions are attributed to that person. The client credentials flow is application-level and needs the Mcp.Tools.ReadWrite.All app role, so any caller holding that credential acts as the app, and the audit trail names the app instead of a person. Choose delegated access for team use unless an unattended workload has a clear need, and confirm who can consent to or assign the app role.

Authentication guide

On-Behalf-Of or hosting identity

The --outgoing-auth-strategy flag sets how the server calls Azure. UseOnBehalfOf exchanges the user's token, so Azure evaluates that user's own RBAC roles. UseHostingEnvironmentIdentity runs as the server's managed identity, which can have broader rights than any one user. If the flag is omitted, On-Behalf-Of applies. Confirm which strategy is set on each deployment, because an application bearer token cannot be combined with On-Behalf-Of.

Scopes and roles in the tenant

Granting the scopes and app roles is a tenant-level decision that an Entra administrator must make, and it sets what can reach the server at all. Check that the app registration exposes only the scopes the team needs and that consent is limited to approved users. Confirm whether the Azure RBAC roles the identity holds on target resources are narrow enough, since the guide says those roles apply regardless of the credential, for example Storage Blob Data Reader for storage operations.

HTTP transport or STDIO

The Authentication guide recommends HTTP transport for production hosting, where every inbound request must carry a valid Entra ID bearer token. STDIO runs the server as a local process on the developer's machine. If STDIO is unavoidable, set AZURE_TOKEN_CREDENTIALS=prod so the credential chain uses only non-interactive credentials. Decide which transport each team uses and document the exception path for STDIO.

Self-hosted template or local install

Microsoft documents two self-hosted remote deployments, one for Microsoft Foundry and one for Copilot Studio, both built with the Azure Developer CLI and Azure Container Apps. The Copilot Studio template provisions a Container App, a user-assigned managed identity, an Entra app registration and Application Insights. A local install keeps the server on each device. Choose the hosted template when central control, logging and HTTP authentication are required, and confirm who will own the resources and their telemetry afterward.

Copilot Studio deployment guide

Subscription role for deployment

The Copilot Studio guide lists Owner or User Access Administrator on the Azure subscription as a prerequisite for the self-hosted deployment. Either role can grant access broadly, so the people who deploy the template are a small, privileged group. Ask who holds those roles today, whether they are assigned through privileged access management, and whether the deploying identity should be removed or reduced after provisioning.

How the setup changes by identity provider, team size and environment

When developers sign in to the server with their own Entra ID accounts, the setup relies on delegated access. The inbound request must carry a valid Entra ID bearer token, and the authorization code flow is the delegated path that needs the Mcp.Tools.ReadWrite scope. For outbound calls, the server can exchange the user's token through On-Behalf-Of, which is also the default when the --outgoing-auth-strategy flag is not given. Each person's access to Azure is then bounded by their own RBAC roles.

  • Inbound token: every request needs a valid Entra ID bearer token issued for the delegated scope.
  • Outbound strategy: On-Behalf-Of carries the user's identity to Azure, so audit trails and permissions reflect the individual.
  • Role assignments: each user needs Azure RBAC roles on the target resources, such as Storage Blob Data Reader for storage reads.
  • Application tokens: an application bearer token combined with On-Behalf-Of is not supported, because it carries no user identity to exchange.
  • Local clients: for IDE clients that run the server on the workstation, check which credential chain the client uses.

Before approving this model, confirm with your identity team how conditional access and consent apply to the scope, and check that every user's role assignments match their job.

Order of work to put the Azure MCP server into production

This sequence moves the Azure MCP Server from a licensing and identity review to a tested remote deployment, so each control is confirmed before a team relies on it. The output is a signed-off configuration with evidence that denied operations are denied.

  1. Confirm licensing and support terms with Microsoft

    The security or procurement lead confirms with Microsoft which terms cover the Azure MCP Server in your tenant, the supported clients you plan to use, and who supports a self-hosted deployment. Record the source of each answer, including the Microsoft Learn overview and the microsoft/mcp repository license, which the README badge shows as MIT. Done when the reviewers have written answers on support scope and the client list is confirmed against the supported hosts, such as Visual Studio Code, Cursor or Copilot-based tooling, for each team.

  2. Register the app and scopes in Entra ID

    The identity administrator registers the application in Entra ID and defines the Mcp.Tools.ReadWrite delegated scope for user sign-in. If an application-level flow is needed, the Mcp.Tools.ReadWrite.All app role is added and granted only to the service identity that requires it. Confirm that every inbound request must carry a valid Entra ID bearer token by testing a call with no token and a call with a token for an unassigned user, and check that both are rejected. Done when the app registration, scope and role assignments are documented and the rejected calls are captured in the change record.

  3. Decide delegated versus application access

    The architecture owner chooses between the authorization code flow, which acts as the signed-in user and is the better fit when results must follow a person's permissions, and the client credentials flow, which runs as an application and carries broader reach. Record the choice per use case instead of one tenant-wide setting. Confirm that an application token is never paired with On-Behalf-Of, because the token carries no user identity to exchange. Done when each use case has a named flow, a named owner and a note on which identity Azure will see in its logs.

  4. Assign Azure RBAC roles on the narrowest resources

    The subscription or resource owner grants Azure RBAC roles to the identity that the server will use, scoped to specific resource groups or resources rather than the whole subscription. Use read-only roles where the use case allows, such as Storage Blob Data Reader for storage reads. Remember that Azure RBAC applies whatever the credential, so the roles are the real boundary. For self-hosted remote deployments, check that the Copilot Studio guide's prerequisite of Owner or User Access Administrator on the subscription is used only for the deployment step and is not left on the runtime identity. Done when an access review shows only the roles listed in the change record, with no subscription-wide assignments left in place.

  5. Deploy remote HTTP with the chosen outbound strategy

    The platform engineer deploys the server with HTTP transport, which the microsoft/mcp Authentication guide recommends for production hosting, and sets the --outgoing-auth-strategy flag to UseOnBehalfOf or UseHostingEnvironmentIdentity to match step three. Where the Copilot Studio azd template is used, it provisions an Azure Container App, a user-assigned managed identity with Subscription Reader, an Entra app registration and Application Insights, so review that Subscription Reader scope against step four. If STDIO is ever required, set AZURE_TOKEN_CREDENTIALS=prod. Done when the deployed flag value matches the approved design and the managed identity's role list matches the record.

  6. Restrict which clients and tools are used

    The IT administrator limits which client applications may call the server and which tools are enabled. Tools are disabled by default in supported hosts, so enable only the groups each team approved. Confirm that the approved clients are the only ones that obtain tokens for the app registration, for example by requiring user or admin assignment on the enterprise application where your tenant supports it. Record the tool list and client list in the rollout record. Done when a test user on an unapproved client cannot obtain a token, and the enabled tool list matches the record.

  7. Verify denied operations with test identities

    The security reviewer signs in with at least two test identities: one with the intended role and one without it. Run the in-scope operations and then the out-of-scope ones, including write operations and reads on resources outside the granted scope. Confirm each denied operation returns an authorization failure and appears in the logs, and that the allowed operations succeed with the expected identity. Repeat this check after any change to roles, flags or clients. Done when the test results, including the denied calls, are filed with the approval record and the reviewer signs off on each control.

Evidence a security reviewer will ask for and where it comes from

This table lists the configuration artifacts a reviewer should request for a team deployment of the Azure MCP Server, where each one lives, and who produces it. Use it to build the evidence request before approving OAuth-based access or the self-hosted template. The main takeaway is that most evidence sits in the customer's own Entra ID tenant and Azure subscription, so the customer's identity and platform teams must supply it, not the vendor.

Evidence itemWhere it livesWho produces it
Entra app registration and scope grantsEntra ID app registrations: API permissions for Mcp.Tools.ReadWrite (delegated) or Mcp.Tools.ReadWrite.All (application), with admin consent recordsCustomer identity team, reviewed against the Authentication guide
Token validation configurationServer settings for inbound bearer token checks, including expected audience and issuer for the Entra tenantCustomer platform team who deploys the remote server
Outgoing auth strategy settingStartup configuration for the --outgoing-auth-strategy flag, set to UseOnBehalfOf or UseHostingEnvironmentIdentity; the default is On-Behalf-OfCustomer platform team; confirm the value in the deployed container configuration
RBAC role assignments on target resourcesAzure role assignments at subscription, resource group or resource scope, for the user or managed identity that makes outbound callsSubscription owner or delegated administrator; exported from Azure role assignment records
Container App and managed identity definitionsThe azd template's Bicep or deployment outputs: the Azure Container App, the user-assigned managed identity and its Subscription Reader assignmentGenerated by the azd template at deployment; the customer retains the deployed definitions
Application Insights configurationThe Application Insights resource linked to the Container App, with sampling, retention and access settingsCustomer platform or operations team; confirm retention in their own workspace settings
Owner or User Access Administrator approval recordChange ticket or approval record for the subscription-level role needed to run the self-hosted deploymentCustomer IT or governance function that holds the approval; the record is internal, not issued by Microsoft

Questions buyers ask before approving the Azure MCP server

Can our team set up the Azure MCP Server without outside help?

Often yes, if your engineers already run Entra ID and Azure RBAC, but the work is in the design decisions rather than the install. A developer can add the server to a supported host such as Visual Studio Code or Cursor, where the tools are disabled by default and follow the user's own subscription permissions. A remote deployment is different: the Microsoft Learn Copilot Studio guide lists Owner or User Access Administrator on the Azure subscription as a prerequisite, which is a privileged role that your identity team must approve. Confirm internally who can grant that role before you plan the project, and decide whether an outside partner should support the design. DeployOpen plans and implements self-hosted deployments inside your own Azure tenant under a fixed-scope written agreement.

What drives the effort of an enterprise Azure MCP Server rollout?

Three things drive effort most: identity design, RBAC scoping and whether you self-host. Identity design covers which flow each client uses, since the authorization code flow is delegated and needs the Mcp.Tools.ReadWrite scope, while the client credentials flow is application-level and needs the Mcp.Tools.ReadWrite.All role. RBAC scoping means assigning each identity only the roles it needs on target resources, for example Storage Blob Data Reader for storage reads. Self-hosting adds the Azure Container Apps, managed identity and app registration work described in the Copilot Studio guide. Each choice you narrow reduces review scope, and each broad grant, such as a subscription-wide reader role, widens it.

What cost components should we expect for the Azure MCP Server?

The server itself is published by Microsoft, and its source is under the MIT license, so the software has no license fee in the supplied facts. Your costs fall into groups. One-time costs include design, identity and RBAC setup, and the initial deployment. Recurring costs include the Azure resources a self-hosted deployment runs, such as Container Apps, Application Insights and the managed identity, plus the Entra and Azure administration time that continues after go-live. Consumption charges depend on your own usage and region, so ask Microsoft's pricing pages and your account team for current rates. Ask any services provider to separate fixed build fees from ongoing support in the quote.

Do we need a separate Microsoft license to use it?

The supplied facts do not state a separate license for the server, so confirm it rather than assume it. What is documented is that tool availability reflects each user's Azure subscription permissions, which means your existing Azure access and role assignments decide what an agent can reach. Supported hosts carry their own licensing: in Visual Studio 2022 version 17.14.30 or later, the tools ship with the Azure development workload. Ask Microsoft or your reseller to confirm in writing which license, if any, covers the server, each host you plan to use, and any Azure consumption that a self-hosted deployment creates.

Does the Azure MCP Server support SSO with our company identity provider?

The server signs in through Microsoft Entra ID, so it works with an Entra tenant directly. The microsoft/mcp Authentication guide says every inbound request to a remote server must carry a valid Entra ID bearer token, and the server uses the Azure Identity library, so access follows the identity and RBAC roles of whoever or whatever runs it. If your company uses another identity provider, the server does not document a direct connection to it, so you would need to federate that provider into Entra and confirm the result with Microsoft. Test a federated sign-in before you approve the rollout.

What should we request in a quote for an Azure MCP Server engagement?

Ask for a written scope that names the deployment type, either local developer use in supported hosts or the self-hosted remote deployment, and the flow each client will use. Request the list of Azure resources to be created, the roles to be granted and who approves them, and the outbound strategy, either On-Behalf-Of or hosting environment identity. Require a statement of deliverables, such as configuration documentation, a test of the sign-in path and the RBAC review, plus timelines agreed in writing. Separate one-time work from any retainer for upgrades and monitoring, and ask who pays for Azure consumption during testing. DeployOpen works from a written scope and does not publish a price list, so the quote follows from the scope.

How does this page differ from the Azure MCP server security and telemetry pages?

This page covers setup: how the server authenticates, which OAuth flow and scopes apply, how the on-behalf-of or managed identity outbound path works, and what the self-hosted deployment creates. The security page covers what the server can read and change through RBAC, which tools are high risk, and the options that narrow them, such as read-only mode, elicitation and least privilege. The data privacy and telemetry page covers what the server collects, where telemetry goes in a self-hosted deployment and how sensitive values in prompts are protected. Read the setup decisions here first, then use the other two pages to check what the identity you chose can do and what it reports.

How DeployOpen helps teams review and roll out the Azure MCP server

DeployOpen plans and tests the rollout of the Azure MCP server for a specific team, from the Entra ID sign-in and outbound identity choices through to a self-hosted deployment in the client's own Azure environment. The work is fixed-scope, with the scope, deliverables and timeline agreed in writing before any work starts.

How we scope

  • We agree in writing which clients, tools and Azure subscriptions the Azure MCP server will reach.
  • We map who signs in, which OAuth flow applies, and which token scopes each client needs.
  • We confirm the outbound identity choice, On-Behalf-Of or hosting environment identity, and the Azure RBAC roles it requires.

How we build

  • We configure the inbound Entra ID bearer token checks and the outbound authentication strategy for the chosen transport.
  • For a self-hosted remote deployment, we set up the Azure Developer CLI template and review the identities it provisions.
  • We test the setup against the permissions, tool exposure and credential handling agreed in the scope, then fix what the tests find.

How we hand over

  • You receive documentation of the sign-in flows, token scopes, role assignments and deployment settings as configured.
  • We provide a findings report with fixes, followed by a retest to confirm the changes work as intended.
  • Your security, identity and platform teams get the evidence they need to review and approve the setup.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after the handover.
  • A retainer can cover reviewing changes to Azure roles, subscriptions and the Azure MCP Server release you run.
  • Ask any provider to confirm in writing which environments and versions their support covers before you sign.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.