首页 > 其他分享 >DelegateAuthenticationProvider not found after updating Microsoft Graph

DelegateAuthenticationProvider not found after updating Microsoft Graph

时间:2023-03-06 12:44:16浏览次数:51  
标签:Graph after DelegateAuthenticationProvider QueryParameters var new Microsoft

c# - DelegateAuthenticationProvider not found after updating Microsoft Graph - Stack Overflow

回答

msgraph-sdk-dotnet/upgrade-to-v5.md at feature/5.0 · microsoftgraph/msgraph-sdk-dotnet · GitHub

 

var authenticationProvider = new BaseBearerTokenAuthenticationProvider(new TokenProvider());
            var graphClient = new GraphServiceClient(authenticationProvider);

var userResponse = await graphClient.Users
                .GetAsync(r=>
                {
                    r.QueryParameters.Top = 10;
                    r.QueryParameters.Count = true;
                    r.Headers.Add("ConsistencyLevel", "eventual");
                    r.QueryParameters.Search = $"\"displayName:{condition}\" OR \"mail:{condition}\"";
                });
            return userResponse.Value.ToArray();

 

标签:Graph,after,DelegateAuthenticationProvider,QueryParameters,var,new,Microsoft
From: https://www.cnblogs.com/chucklu/p/17183370.html

相关文章