Aspire.Hosting.Azure.EntraId

Official
📦 Aspire.Hosting.Azure.EntraIdv17.0.0-preview.1.26567.5
35Functions
8Types

Types

Functions

methodaddEntraIdApplicationbuilder
Adds a Microsoft Entra ID application registration resource to the application model.
addEntraIdApplication(name: string): EntraIdApplicationResource
methodaddExistingEntraIdApplicationbuilder
References an existing registration without enabling Azure provisioning or querying Microsoft Graph.
addExistingEntraIdApplication(name: string, tenantId: string | ParameterResource, clientId: string | ParameterResource): EntraIdApplicationResource
methodasExistingApplicationbuilder
References an existing registration without undoing the Azure provisioning setup enabled when this resource was added.
asExistingApplication(tenantId: string | ParameterResource, clientId: string | ParameterResource): EntraIdApplicationResource
methodgetScopeUri
Gets an expression for the full URI of one of this registration's scopes, such as api://{clientId}/access_as_user.
getScopeUri(scopeName: string): ReferenceExpression
methodpublishWithAppRoleAssignmentbuilder
Publishes explicit application-role assignments to a managed identity or a compute resource's managed identity.
publishWithAppRoleAssignment(identity: AzureUserAssignedIdentityResource | IComputeResource, roleValues: string[]): EntraIdApplicationResource
methodpublishWithFederatedManagedIdentityCredentialbuilder
Publishes managed identity federation trust for a registration created by Aspire.
publishWithFederatedManagedIdentityCredential(identity?: IComputeResource | AzureUserAssignedIdentityResource): EntraIdApplicationResource
methodrunWithLocalDeveloperCertificateCredentialbuilder
Creates and provisions a short-lived certificate credential for local development.
runWithLocalDeveloperCertificateCredential(): EntraIdApplicationResource
methodwithAdminConsentbuilder
Grants tenant-wide consent to delegated permissions that this registration declared for another registration in the AppHost.
withAdminConsent(api: EntraIdApplicationResource, scopeNames: string[]): EntraIdApplicationResource
methodwithAllowWebApiToBeAuthorizedByACLbuilder
Enables ACL-based authorization for daemon-to-API scenarios.
withAllowWebApiToBeAuthorizedByACL(): EntraIdApplicationResource
methodwithApiPermissionsbuilder
Declares that this registration requires delegated permissions to scopes of another registration in the AppHost.
withApiPermissions(api: EntraIdApplicationResource, scopeNames: string[]): EntraIdApplicationResource
methodwithApplicationIdUribuilder
Exposes the registration as an API identified by an application ID URI.
withApplicationIdUri(applicationIdUri?: string): EntraIdApplicationResource
methodwithApplicationOwnersbuilder
Appends an application owner supplied as a literal directory object GUID or a parameter.
withApplicationOwners(ownerObjectId: string | ParameterResource): EntraIdApplicationResource
methodwithAppRolebuilder
Declares an application role on a registration created by Aspire.
withAppRole(value: string, displayName: string, description: string, allowedMemberTypes?: string[], id?: string, isEnabled?: boolean): EntraIdApplicationResource
methodwithAudiencebuilder
Adds an accepted audience for this application.
withAudience(audience: string): EntraIdApplicationResource
methodwithCertificateDistinguishedNamebuilder
Adds a certificate credential from the certificate store by distinguished name.
withCertificateDistinguishedName(storePath: string, distinguishedName: string): EntraIdApplicationResource
methodwithCertificateFromFilebuilder
Appends a certificate file credential. The file path is on the consuming resource, not the AppHost.
withCertificateFromFile(filePath: string, password?: ParameterResource): EntraIdApplicationResource
methodwithCertificateFromKeyVaultbuilder
Adds a certificate credential using a vault URL or Key Vault resource.
withCertificateFromKeyVault(keyVaultUrl: string | AzureKeyVaultResource, certificateName: string): EntraIdApplicationResource
methodwithCertificateThumbprintbuilder
Adds a certificate credential from the certificate store by thumbprint.
withCertificateThumbprint(storePath: string, thumbprint: string): EntraIdApplicationResource
methodwithClientCapabilitybuilder
Adds a client capability (e.g., `"cp1"` for Continuous Access Evaluation).
withClientCapability(capability: string): EntraIdApplicationResource
methodwithClientSecretbuilder
Adds a client secret credential to this Entra ID application.
withClientSecret(clientSecret: ParameterResource): EntraIdApplicationResource
methodwithEntraIdReferencebuilder
Injects Entra ID authentication configuration into a consuming resource and sets the prefix of its DownstreamApis entries.
withEntraIdReference(source: EntraIdApplicationResource, connectionName?: string, downstreamApisPrefix?: string): IResourceWithEnvironment
methodwithExternalApiAdminConsentbuilder
Grants tenant-wide consent to permissions that this registration declared for an API that is not an Aspire resource.
withExternalApiAdminConsent(api: EntraIdWellKnownApi | EntraIdCustomApi, permissions: EntraIdExternalApiPermission[]): EntraIdApplicationResource
methodwithExternalApiPermissionsbuilder
Declares permissions to a Microsoft first-party or other API that is not an Aspire resource, such as Microsoft Graph.
withExternalApiPermissions(api: EntraIdWellKnownApi | EntraIdCustomApi, permissions: EntraIdExternalApiPermission[]): EntraIdApplicationResource
methodwithExtraQueryParameterbuilder
Adds an extra query parameter to send to the identity provider.
withExtraQueryParameter(key: string, value: string): EntraIdApplicationResource
methodwithFederatedManagedIdentityCredentialbuilder
Configures a pre-existing managed identity trust for token acquisition, without provisioning or assigning an identity.
withFederatedManagedIdentityCredential(managedIdentityClientId: string, options?: EntraIdTokenExchangeOptions): EntraIdApplicationResource
methodwithIdTokenIssuancebuilder
Enables ID-token issuance through implicit and hybrid flows for a registration created by Aspire.
withIdTokenIssuance(): EntraIdApplicationResource
methodwithInstancebuilder
Configures the Entra ID instance URL. Defaults to `https://login.microsoftonline.com/`.
withInstance(instance: string): EntraIdApplicationResource
methodwithOwnersbuilder
Appends an owner to both the application registration and service principal.
withOwners(ownerObjectId: string | ParameterResource): EntraIdApplicationResource
methodwithPreAuthorizedApplicationbuilder
Pre-authorizes a client application to request some of this registration's scopes without any consent prompt.
withPreAuthorizedApplication(client: EntraIdApplicationResource, scopeNames: string[]): EntraIdApplicationResource
methodwithRedirectUrisbuilder
Appends web redirect URIs supplied as a literal, a parameter, or an endpoint.
withRedirectUris(redirectUri: string | ParameterResource | EndpointReference, callbackPaths?: string[]): EntraIdApplicationResource
methodwithScopebuilder
Exposes a delegated permission scope that clients can request to call this registration as an API.
withScope(name: string, description: string, options?: EntraIdScopeOptions): EntraIdApplicationResource
methodwithSendX5Cbuilder
Sends the `x5c` claim (the public key of the certificate) with token requests.
withSendX5C(): EntraIdApplicationResource
methodwithServicePrincipalOwnersbuilder
Appends a service principal owner supplied as a literal directory object GUID or a parameter.
withServicePrincipalOwners(ownerObjectId: string | ParameterResource): EntraIdApplicationResource
methodwithSignedAssertionFilebuilder
Appends a signed assertion file credential, such as an AKS workload identity token.
withSignedAssertionFile(filePath?: string): EntraIdApplicationResource
methodwithSignInAudiencebuilder
Configures which accounts can sign in to this application.
withSignInAudience(signInAudience: EntraIdSignInAudience): EntraIdApplicationResource

Enums