Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithEntraIdReference

Method
📦 Aspire.Hosting.Azure.EntraId v17.0.0-preview.1.26565.2
func (ResourceWithEnvironment) WithEntraIdReference(
source EntraIdApplicationResource,
options ...*WithEntraIdReferenceOptions,
) ResourceWithEnvironment

Signature

methodWithEntraIdReferencebuilder
Injects Entra ID authentication configuration into a consuming resource and sets the prefix of its DownstreamApis entries.
WithEntraIdReference(
source EntraIdApplicationResource,
options ...*WithEntraIdReferenceOptions,
) ResourceWithEnvironment
sourceEntraIdApplicationResourceThe Entra ID application resource to reference.
options...*WithEntraIdReferenceOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithEntraIdReferenceOptions argument.

ConnectionName*stringThe environment variable prefix. Defaults to AzureAd for .NET program resources and the registration's name otherwise.
DownstreamApisPrefix*stringThe configuration prefix of the DownstreamApis entries. Defaults to DownstreamApis.
ResourceWithEnvironment

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeCSharpAppResource
typeContainerResource
typeDotnetToolResource
typeExecutableResource
typeProjectResource