AbstractAcquireTokenParameterBuilder<T>.WithScopes Method

Definition

Specifies which scopes to request. This method is used when your application needs to specify the scopes needed to call a protected API. See https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent to learn more about scopes, permissions and consent, and https://docs.microsoft.com/azure/active-directory/develop/msal-v1-app-scopes to learn how to create scopes for legacy applications which used to expose OAuth2 permissions.

protected T WithScopes (System.Collections.Generic.IEnumerable<string> scopes);
member this.WithScopes : seq<string> -> 'T
Protected Function WithScopes (scopes As IEnumerable(Of String)) As T

Parameters

scopes
IEnumerable<String>

Scopes requested to access a protected API

Returns

T

The builder to chain the .With methods.

Applies to