Aspire.Hosting.Azure.EntraId
Official
📦 Aspire.Hosting.Azure.EntraIdv17.0.0-preview.1.26567.535Functions
8Types
8 types and 0 members
Types
Functions
method
addEntraIdApplicationbuilderAdds a Microsoft Entra ID application registration resource to the application model.
addEntraIdApplication(name: string): EntraIdApplicationResourcemethod
addExistingEntraIdApplicationbuilderReferences an existing registration without enabling Azure provisioning or querying Microsoft Graph.
addExistingEntraIdApplication(name: string, tenantId: string | ParameterResource, clientId: string | ParameterResource): EntraIdApplicationResourcemethod
asExistingApplicationbuilderReferences an existing registration without undoing the Azure provisioning setup enabled when this resource was added.
asExistingApplication(tenantId: string | ParameterResource, clientId: string | ParameterResource): EntraIdApplicationResourcemethod
getScopeUriGets an expression for the full URI of one of this registration's scopes, such as api://{clientId}/access_as_user.
getScopeUri(scopeName: string): ReferenceExpressionmethod
publishWithAppRoleAssignmentbuilderPublishes explicit application-role assignments to a managed identity or a compute resource's managed identity.
publishWithAppRoleAssignment(identity: AzureUserAssignedIdentityResource | IComputeResource, roleValues: string[]): EntraIdApplicationResourcemethod
publishWithFederatedManagedIdentityCredentialbuilderPublishes managed identity federation trust for a registration created by Aspire.
publishWithFederatedManagedIdentityCredential(identity?: IComputeResource | AzureUserAssignedIdentityResource): EntraIdApplicationResourcemethod
runWithLocalDeveloperCertificateCredentialbuilderCreates and provisions a short-lived certificate credential for local development.
runWithLocalDeveloperCertificateCredential(): EntraIdApplicationResourcemethod
withAdminConsentbuilderGrants tenant-wide consent to delegated permissions that this registration declared for another registration in the AppHost.
withAdminConsent(api: EntraIdApplicationResource, scopeNames: string[]): EntraIdApplicationResourcemethod
withAllowWebApiToBeAuthorizedByACLbuilderEnables ACL-based authorization for daemon-to-API scenarios.
withAllowWebApiToBeAuthorizedByACL(): EntraIdApplicationResourcemethod
withApiPermissionsbuilderDeclares that this registration requires delegated permissions to scopes of another registration in the AppHost.
withApiPermissions(api: EntraIdApplicationResource, scopeNames: string[]): EntraIdApplicationResourcemethod
withApplicationIdUribuilderExposes the registration as an API identified by an application ID URI.
withApplicationIdUri(applicationIdUri?: string): EntraIdApplicationResourcemethod
withApplicationOwnersbuilderAppends an application owner supplied as a literal directory object GUID or a parameter.
withApplicationOwners(ownerObjectId: string | ParameterResource): EntraIdApplicationResourcemethod
withAppRolebuilderDeclares an application role on a registration created by Aspire.
withAppRole(value: string, displayName: string, description: string, allowedMemberTypes?: string[], id?: string, isEnabled?: boolean): EntraIdApplicationResourcemethod
withAudiencebuilderAdds an accepted audience for this application.
withAudience(audience: string): EntraIdApplicationResourcemethod
withCertificateDistinguishedNamebuilderAdds a certificate credential from the certificate store by distinguished name.
withCertificateDistinguishedName(storePath: string, distinguishedName: string): EntraIdApplicationResourcemethod
withCertificateFromFilebuilderAppends a certificate file credential. The file path is on the consuming resource, not the AppHost.
withCertificateFromFile(filePath: string, password?: ParameterResource): EntraIdApplicationResourcemethod
withCertificateFromKeyVaultbuilderAdds a certificate credential using a vault URL or Key Vault resource.
withCertificateFromKeyVault(keyVaultUrl: string | AzureKeyVaultResource, certificateName: string): EntraIdApplicationResourcemethod
withCertificateThumbprintbuilderAdds a certificate credential from the certificate store by thumbprint.
withCertificateThumbprint(storePath: string, thumbprint: string): EntraIdApplicationResourcemethod
withClientCapabilitybuilderAdds a client capability (e.g., `"cp1"` for Continuous Access Evaluation).
withClientCapability(capability: string): EntraIdApplicationResourcemethod
withClientSecretbuilderAdds a client secret credential to this Entra ID application.
withClientSecret(clientSecret: ParameterResource): EntraIdApplicationResourcemethod
withEntraIdReferencebuilderInjects Entra ID authentication configuration into a consuming resource and sets the prefix of its DownstreamApis entries.
withEntraIdReference(source: EntraIdApplicationResource, connectionName?: string, downstreamApisPrefix?: string): IResourceWithEnvironmentmethod
withExternalApiAdminConsentbuilderGrants tenant-wide consent to permissions that this registration declared for an API that is not an Aspire resource.
withExternalApiAdminConsent(api: EntraIdWellKnownApi | EntraIdCustomApi, permissions: EntraIdExternalApiPermission[]): EntraIdApplicationResourcemethod
withExternalApiPermissionsbuilderDeclares 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[]): EntraIdApplicationResourcemethod
withExtraQueryParameterbuilderAdds an extra query parameter to send to the identity provider.
withExtraQueryParameter(key: string, value: string): EntraIdApplicationResourcemethod
withFederatedManagedIdentityCredentialbuilderConfigures a pre-existing managed identity trust for token acquisition, without provisioning or assigning an identity.
withFederatedManagedIdentityCredential(managedIdentityClientId: string, options?: EntraIdTokenExchangeOptions): EntraIdApplicationResourcemethod
withIdTokenIssuancebuilderEnables ID-token issuance through implicit and hybrid flows for a registration created by Aspire.
withIdTokenIssuance(): EntraIdApplicationResourcemethod
withInstancebuilderConfigures the Entra ID instance URL. Defaults to `https://login.microsoftonline.com/`.
withInstance(instance: string): EntraIdApplicationResourcemethod
withOwnersbuilderAppends an owner to both the application registration and service principal.
withOwners(ownerObjectId: string | ParameterResource): EntraIdApplicationResourcemethod
withPreAuthorizedApplicationbuilderPre-authorizes a client application to request some of this registration's scopes without any consent prompt.
withPreAuthorizedApplication(client: EntraIdApplicationResource, scopeNames: string[]): EntraIdApplicationResourcemethod
withRedirectUrisbuilderAppends web redirect URIs supplied as a literal, a parameter, or an endpoint.
withRedirectUris(redirectUri: string | ParameterResource | EndpointReference, callbackPaths?: string[]): EntraIdApplicationResourcemethod
withScopebuilderExposes a delegated permission scope that clients can request to call this registration as an API.
withScope(name: string, description: string, options?: EntraIdScopeOptions): EntraIdApplicationResourcemethod
withSendX5CbuilderSends the `x5c` claim (the public key of the certificate) with token requests.
withSendX5C(): EntraIdApplicationResourcemethod
withServicePrincipalOwnersbuilderAppends a service principal owner supplied as a literal directory object GUID or a parameter.
withServicePrincipalOwners(ownerObjectId: string | ParameterResource): EntraIdApplicationResourcemethod
withSignedAssertionFilebuilderAppends a signed assertion file credential, such as an AKS workload identity token.
withSignedAssertionFile(filePath?: string): EntraIdApplicationResourcemethod
withSignInAudiencebuilderConfigures which accounts can sign in to this application.
withSignInAudience(signInAudience: EntraIdSignInAudience): EntraIdApplicationResource