# Aspire.Hosting.Azure.EntraId

- Module: `Aspire.Hosting.Azure.EntraId`
- Version: `17.0.0-preview.1.26567.5`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)
- Functions: `35`
- Types: `8`

## Types

- [EntraIdApplicationResource](/reference/api/typescript/aspire.hosting.azure.entraid/entraidapplicationresource.md) -- `handle` - 32 members -- A resource that represents a Microsoft Entra ID application registration.
- [EntraIdCustomApi](/reference/api/typescript/aspire.hosting.azure.entraid/entraidcustomapi.md) -- `type` - 4 fields -- Identifies an API that is not an Aspire resource by its application ID and application ID URI.
- [EntraIdExternalApiPermission](/reference/api/typescript/aspire.hosting.azure.entraid/entraidexternalapipermission.md) -- `type` - 3 fields -- A permission of an API that is not an Aspire resource.
- [EntraIdScopeOptions](/reference/api/typescript/aspire.hosting.azure.entraid/entraidscopeoptions.md) -- `type` - 6 fields -- Optional settings for a scope exposed by a created registration or described by an existing reference.
- [EntraIdTokenExchangeOptions](/reference/api/typescript/aspire.hosting.azure.entraid/entraidtokenexchangeoptions.md) -- `type` - 2 fields -- Optional token exchange settings for a pre-existing managed identity federation trust.

## Functions

- [addEntraIdApplication](/reference/api/typescript/aspire.hosting.azure.entraid/addentraidapplication.md) -- `method` -- Adds a Microsoft Entra ID application registration resource to the application model.
- [addExistingEntraIdApplication](/reference/api/typescript/aspire.hosting.azure.entraid/addexistingentraidapplication.md) -- `method` -- References an existing registration without enabling Azure provisioning or querying Microsoft Graph.
- [asExistingApplication](/reference/api/typescript/aspire.hosting.azure.entraid/asexistingapplication.md) -- `method` -- References an existing registration without undoing the Azure provisioning setup enabled when this resource was added.
- [getScopeUri](/reference/api/typescript/aspire.hosting.azure.entraid/getscopeuri.md) -- `method` -- Gets an expression for the full URI of one of this registration's scopes, such as api://{clientId}/access_as_user.
- [publishWithAppRoleAssignment](/reference/api/typescript/aspire.hosting.azure.entraid/publishwithapproleassignment.md) -- `method` -- Publishes explicit application-role assignments to a managed identity or a compute resource's managed identity.
- [publishWithFederatedManagedIdentityCredential](/reference/api/typescript/aspire.hosting.azure.entraid/publishwithfederatedmanagedidentitycredential.md) -- `method` -- Publishes managed identity federation trust for a registration created by Aspire.
- [runWithLocalDeveloperCertificateCredential](/reference/api/typescript/aspire.hosting.azure.entraid/runwithlocaldevelopercertificatecredential.md) -- `method` -- Creates and provisions a short-lived certificate credential for local development.
- [withAdminConsent](/reference/api/typescript/aspire.hosting.azure.entraid/withadminconsent.md) -- `method` -- Grants tenant-wide consent to delegated permissions that this registration declared for another registration in the AppHost.
- [withAllowWebApiToBeAuthorizedByACL](/reference/api/typescript/aspire.hosting.azure.entraid/withallowwebapitobeauthorizedbyacl.md) -- `method` -- Enables ACL-based authorization for daemon-to-API scenarios.
- [withApiPermissions](/reference/api/typescript/aspire.hosting.azure.entraid/withapipermissions.md) -- `method` -- Declares that this registration requires delegated permissions to scopes of another registration in the AppHost.
- [withApplicationIdUri](/reference/api/typescript/aspire.hosting.azure.entraid/withapplicationiduri.md) -- `method` -- Exposes the registration as an API identified by an application ID URI.
- [withApplicationOwners](/reference/api/typescript/aspire.hosting.azure.entraid/withapplicationowners.md) -- `method` -- Appends an application owner supplied as a literal directory object GUID or a parameter.
- [withAppRole](/reference/api/typescript/aspire.hosting.azure.entraid/withapprole.md) -- `method` -- Declares an application role on a registration created by Aspire.
- [withAudience](/reference/api/typescript/aspire.hosting.azure.entraid/withaudience.md) -- `method` -- Adds an accepted audience for this application.
- [withCertificateDistinguishedName](/reference/api/typescript/aspire.hosting.azure.entraid/withcertificatedistinguishedname.md) -- `method` -- Adds a certificate credential from the certificate store by distinguished name.
- [withCertificateFromFile](/reference/api/typescript/aspire.hosting.azure.entraid/withcertificatefromfile.md) -- `method` -- Appends a certificate file credential. The file path is on the consuming resource, not the AppHost.
- [withCertificateFromKeyVault](/reference/api/typescript/aspire.hosting.azure.entraid/withcertificatefromkeyvault.md) -- `method` -- Adds a certificate credential using a vault URL or Key Vault resource.
- [withCertificateThumbprint](/reference/api/typescript/aspire.hosting.azure.entraid/withcertificatethumbprint.md) -- `method` -- Adds a certificate credential from the certificate store by thumbprint.
- [withClientCapability](/reference/api/typescript/aspire.hosting.azure.entraid/withclientcapability.md) -- `method` -- Adds a client capability (e.g., `"cp1"` for Continuous Access Evaluation).
- [withClientSecret](/reference/api/typescript/aspire.hosting.azure.entraid/withclientsecret.md) -- `method` -- Adds a client secret credential to this Entra ID application.
- [withEntraIdReference](/reference/api/typescript/aspire.hosting.azure.entraid/withentraidreference.md) -- `method` -- Injects Entra ID authentication configuration into a consuming resource and sets the prefix of its DownstreamApis entries.
- [withExternalApiAdminConsent](/reference/api/typescript/aspire.hosting.azure.entraid/withexternalapiadminconsent.md) -- `method` -- Grants tenant-wide consent to permissions that this registration declared for an API that is not an Aspire resource.
- [withExternalApiPermissions](/reference/api/typescript/aspire.hosting.azure.entraid/withexternalapipermissions.md) -- `method` -- Declares permissions to a Microsoft first-party or other API that is not an Aspire resource, such as Microsoft Graph.
- [withExtraQueryParameter](/reference/api/typescript/aspire.hosting.azure.entraid/withextraqueryparameter.md) -- `method` -- Adds an extra query parameter to send to the identity provider.
- [withFederatedManagedIdentityCredential](/reference/api/typescript/aspire.hosting.azure.entraid/withfederatedmanagedidentitycredential.md) -- `method` -- Configures a pre-existing managed identity trust for token acquisition, without provisioning or assigning an identity.
- [withIdTokenIssuance](/reference/api/typescript/aspire.hosting.azure.entraid/withidtokenissuance.md) -- `method` -- Enables ID-token issuance through implicit and hybrid flows for a registration created by Aspire.
- [withInstance](/reference/api/typescript/aspire.hosting.azure.entraid/withinstance.md) -- `method` -- Configures the Entra ID instance URL. Defaults to `https://login.microsoftonline.com/`.
- [withOwners](/reference/api/typescript/aspire.hosting.azure.entraid/withowners.md) -- `method` -- Appends an owner to both the application registration and service principal.
- [withPreAuthorizedApplication](/reference/api/typescript/aspire.hosting.azure.entraid/withpreauthorizedapplication.md) -- `method` -- Pre-authorizes a client application to request some of this registration's scopes without any consent prompt.
- [withRedirectUris](/reference/api/typescript/aspire.hosting.azure.entraid/withredirecturis.md) -- `method` -- Appends web redirect URIs supplied as a literal, a parameter, or an endpoint.
- [withScope](/reference/api/typescript/aspire.hosting.azure.entraid/withscope.md) -- `method` -- Exposes a delegated permission scope that clients can request to call this registration as an API.
- [withSendX5C](/reference/api/typescript/aspire.hosting.azure.entraid/withsendx5c.md) -- `method` -- Sends the `x5c` claim (the public key of the certificate) with token requests.
- [withServicePrincipalOwners](/reference/api/typescript/aspire.hosting.azure.entraid/withserviceprincipalowners.md) -- `method` -- Appends a service principal owner supplied as a literal directory object GUID or a parameter.
- [withSignedAssertionFile](/reference/api/typescript/aspire.hosting.azure.entraid/withsignedassertionfile.md) -- `method` -- Appends a signed assertion file credential, such as an AKS workload identity token.
- [withSignInAudience](/reference/api/typescript/aspire.hosting.azure.entraid/withsigninaudience.md) -- `method` -- Configures which accounts can sign in to this application.

## Enums

- [EntraIdPermissionType](/reference/api/typescript/aspire.hosting.azure.entraid/entraidpermissiontype.md) -- `enum` - 2 values -- The kind of permission that an application requests from an API.
- [EntraIdSignInAudience](/reference/api/typescript/aspire.hosting.azure.entraid/entraidsigninaudience.md) -- `enum` - 4 values -- Specifies which Microsoft accounts can sign in to an Entra ID application.
- [EntraIdWellKnownApi](/reference/api/typescript/aspire.hosting.azure.entraid/entraidwellknownapi.md) -- `enum` - 3 values -- The Microsoft first-party APIs whose common permissions Aspire knows by name.
