Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

AbstractApplicationBuilder<T>.WithTenantId(String) Method

Definition

Namespace:
Microsoft.Identity.Client
Assembly:
Microsoft.Identity.Client.dll
Package:
Microsoft.Identity.Client v4.83.3

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Sets the tenant ID of the organization from which the application will let users sign-in. This is classically a GUID or a domain name. See https://aka.ms/msal-net-application-configuration. Although it is also possible to set tenantId to common, organizations, and consumers, it's recommended to use one of the overrides of WithAuthority(AzureCloudInstance, AadAuthorityAudience, Boolean).

public T WithTenantId(string tenantId);
member this.WithTenantId : string -> 'T
Public Function WithTenantId (tenantId As String) As T

Parameters

tenantId
String

tenant ID of the Azure AD tenant or a domain associated with this Azure AD tenant, in order to sign-in a user of a specific organization only

Returns

T

The builder to chain the .With methods

Applies to


Feedback

Was this page helpful?