Exemplo n.º 1
0
 public RbacManagementClient(string tenantID, TokenCredential tokenCredential, RbacManagementClientOptions options = null) : this(tenantID, null, tokenCredential, options)
 {
 }
Exemplo n.º 2
0
        public RbacManagementClient(string tenantID, Uri endpoint, TokenCredential tokenCredential, RbacManagementClientOptions options = null)
        {
            if (tenantID == null)
            {
                throw new ArgumentNullException(nameof(tenantID));
            }
            endpoint ??= new Uri("https://graph.windows.net");

            options ??= new RbacManagementClientOptions();
            _clientDiagnostics = new ClientDiagnostics(options);
            _pipeline          = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(tokenCredential, $"{endpoint}/.default"));
            _tenantID          = tenantID;
            _endpoint          = endpoint;
        }