B2CGraphShell.B2CGraphClient.B2CGraphClient C# (CSharp) Метод

B2CGraphClient() публичный Метод

public B2CGraphClient ( string clientId, string clientSecret, string tenant ) : Microsoft.IdentityModel.Clients.ActiveDirectory
clientId string
clientSecret string
tenant string
Результат Microsoft.IdentityModel.Clients.ActiveDirectory
        public B2CGraphClient(string clientId, string clientSecret, string tenant)
        {
            // The client_id, client_secret, and tenant are pulled in from the App.config file
            this.clientId = clientId;
            this.clientSecret = clientSecret;
            this.tenant = tenant;

            // The AuthenticationContext is ADAL's primary class, in which you indicate the direcotry to use.
            this.authContext = new AuthenticationContext("https://login.microsoftonline.com/" + tenant);

            // The ClientCredential is where you pass in your client_id and client_secret, which are 
            // provided to Azure AD in order to receive an access_token using the app's identity.
            this.credential = new ClientCredential(clientId, clientSecret);
        }