EntraIdApplicationResource
A resource that represents a Microsoft Entra ID application registration.
type EntraIdApplicationResource interface { Resource}Methods
AsExistingApplication( tenantId any, clientId any,) EntraIdApplicationResourceParameters
tenantId anyThe registration's home tenant GUID or domain, as a literal or parameter.clientId anyThe registration's application client GUID, as a literal or parameter.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
GetScopeUri GetScopeUri(scopeName string) *ReferenceExpressionParameters
scopeName stringThe name of a scope added with withScope.Returns
*ReferenceExpression An expression that resolves when the registration's application ID URI is known.
Returns a handle; failures surface later via Err().
PublishWithAppRoleAssignment( identity any, roleValues []string,) EntraIdApplicationResourceParameters
identityanyThe user-assigned identity or compute resource receiving the roles.roleValues []string Enabled role values declared on this API that allow Application members.Returns
EntraIdApplicationResource The API registration builder.
Returns a handle; failures surface later via Err().
PublishWithFederatedManagedIdentityCredential(options ...*PublishWithFederatedManagedIdentityCredentialOptions) EntraIdApplicationResourceParameters
options...*PublishWithFederatedManagedIdentityCredentialOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*PublishWithFederatedManagedIdentityCredentialOptions argument.
IdentityanyA compute resource whose identity to trust, an explicit user-assigned identity, or no value to trust every consumer's own identity.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
RunWithLocalDeveloperCertificateCredential() EntraIdApplicationResourceReturns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithAdminConsent( api EntraIdApplicationResource, scopeNames []string,) EntraIdApplicationResourceParameters
apiEntraIdApplicationResource The registration that exposes the scopes.scopeNames []string The names of scopes already declared with WithApiPermissions .Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithApiPermissions( api EntraIdApplicationResource, scopeNames []string,) EntraIdApplicationResourceParameters
apiEntraIdApplicationResource The registration that exposes the scopes.scopeNames []string The names of the scopes, added with WithScope to api.Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithApplicationIdUri(options ...*WithApplicationIdUriOptions) EntraIdApplicationResourceParameters
options...*WithApplicationIdUriOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithApplicationIdUriOptions argument.
ApplicationIdUri *stringA custom URI, such as api://contoso-orders or https://contoso.onmicrosoft.com/orders. Omit to use the default api://{clientId}.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithApplicationOwners(ownerObjectId any) EntraIdApplicationResourceParameters
ownerObjectId anyThe directory object ID of a user or service principal.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithAppRole( value string, displayName string, description string, options ...*WithAppRoleOptions,) EntraIdApplicationResourceParameters
valuestringThe value emitted in the roles claim, for example Admin. It must be unique for the application, at most 120 characters, must not start with a period, and may contain only ASCII letters, digits and the punctuation that Microsoft Graph allows.displayName stringThe display name shown in the Microsoft Entra admin center.descriptionstringThe description shown in assignment and consent experiences.options...*WithAppRoleOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithAppRoleOptions argument.
AllowedMemberTypes []string The member types the role can be assigned to, passed through to Microsoft Graph (for example User or Application). Defaults to User.Id*stringAn optional role GUID. When omitted, a stable ID is derived from the registration's resource name and value.IsEnabled *boolWhether the role is enabled. Defaults to true. To retire a role, deploy it with false and leave it declared; disabling is not access revocation because existing assignments still receive the role in tokens.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithAudience(audience string) EntraIdApplicationResourceParameters
audiencestringThe audience value (e.g., api://<client-id> ).Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithCertificateDistinguishedName( storePath string, distinguishedName string,) EntraIdApplicationResourceParameters
storePath stringThe certificate store path (e.g., "CurrentUser/My" ).distinguishedName stringThe certificate distinguished name (e.g., "CN=MyCert" ).Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithCertificateFromFile( filePath string, options ...*WithCertificateFromFileOptions,) EntraIdApplicationResourceParameters
filePath stringThe path to the certificate file on the consumer.options...*WithCertificateFromFileOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithCertificateFromFileOptions argument.
Password*ParameterResource An optional secret parameter for a password-protected certificate.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithCertificateFromKeyVault( keyVaultUrl any, certificateName string,) EntraIdApplicationResourceParameters
keyVaultUrl anyThe vault URL or Key Vault resource containing the certificate.certificateName stringThe name of the certificate in Key Vault.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithCertificateThumbprint( storePath string, thumbprint string,) EntraIdApplicationResourceParameters
storePath stringThe certificate store path (e.g., "CurrentUser/My" ).thumbprintstringThe certificate thumbprint.Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
"cp1" for Continuous Access Evaluation).WithClientCapability(capability string) EntraIdApplicationResourceParameters
capabilitystringThe capability identifier.Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithClientSecret(clientSecret ParameterResource) EntraIdApplicationResourceParameters
clientSecret ParameterResource A secret parameter containing the client secret.Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithExternalApiAdminConsent( api any, permissions []*EntraIdExternalApiPermission,) EntraIdApplicationResourceParameters
apianyA well-known API, or an API identified by its application ID and application ID URI.permissions[]*EntraIdExternalApiPermission Permissions already declared with withExternalApiPermissions.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithExternalApiPermissions( api any, permissions []*EntraIdExternalApiPermission,) EntraIdApplicationResourceParameters
apianyA well-known API, or an API identified by its application ID and application ID URI.permissions[]*EntraIdExternalApiPermission The permissions to declare. Each is delegated unless its type is Application.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithExtraQueryParameter( key string, value string,) EntraIdApplicationResourceParameters
keystringThe query parameter key.valuestringThe query parameter value.Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithFederatedManagedIdentityCredential( managedIdentityClientId string, options ...*EntraIdTokenExchangeOptions,) EntraIdApplicationResourceParameters
managedIdentityClientId stringThe client GUID of a user-assigned managed identity that the registration already trusts.options...*EntraIdTokenExchangeOptions Optional settings, described under Options.Options
Optional parameters are passed as the existing *EntraIdTokenExchangeOptions struct.
Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithIdTokenIssuance() EntraIdApplicationResourceReturns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
https://login.microsoftonline.com/ .WithInstance(instance string) EntraIdApplicationResourceParameters
instancestringThe Entra ID instance URL, such as https://login.microsoftonline.us/ for Azure Government or https://contoso.ciamlogin.com/ for an external tenant.Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithOwners(ownerObjectId any) EntraIdApplicationResourceParameters
ownerObjectId anyThe directory object GUID of a user or service principal, as a literal or parameter.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithRedirectUris( redirectUri any, options ...*WithRedirectUrisOptions,) EntraIdApplicationResourceParameters
redirectUri anyA full URI, a parameter containing comma-separated full URIs, or an endpoint. With callback paths, a parameter supplies a host instead.options...*WithRedirectUrisOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithRedirectUrisOptions argument.
CallbackPaths []string Callback paths starting with '/'. Required for an endpoint; with a host parameter, produces HTTPS URIs. Omit for full URIs.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithScope( name string, description string, options ...*EntraIdScopeOptions,) EntraIdApplicationResourceParameters
namestringThe scope's name, which appears in the token's scp claim, such as access_as_user.descriptionstringWhat the scope allows, shown on the consent page.options...*EntraIdScopeOptions Optional settings, described under Options.Options
Optional parameters are passed as the existing *EntraIdScopeOptions struct.
Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
x5c claim (the public key of the certificate) with token requests.WithSendX5C() EntraIdApplicationResourceReturns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithServicePrincipalOwners(ownerObjectId any) EntraIdApplicationResourceParameters
ownerObjectId anyThe directory object ID of a user or service principal.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithSignedAssertionFile(options ...*WithSignedAssertionFileOptions) EntraIdApplicationResourceParameters
options...*WithSignedAssertionFileOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithSignedAssertionFileOptions argument.
FilePath *stringThe token file path on the consumer. Omit to use the consumer's AZURE_FEDERATED_TOKEN_FILE setting.Returns
EntraIdApplicationResource The registration builder.
Returns a handle; failures surface later via Err().
WithSignInAudience(signInAudience EntraIdSignInAudience) EntraIdApplicationResourceParameters
signInAudience EntraIdSignInAudience The accounts that can sign in. It must match the "Supported account types" setting of the app registration.Returns
EntraIdApplicationResource The resource builder for chaining.
Returns a handle; failures surface later via Err().