Using authProvider with MS SDK for graph calls in C#

后端 未结 2 1263
独厮守ぢ
独厮守ぢ 2020-12-16 17:47

I\'m trying create a C# console application to connect to graph API and get a list of users from AzureAD from a tenant. I have registered the app and the admin has given me

2条回答
  •  萌比男神i
    2020-12-16 18:40

    If you wanna cycle trough the users, replace the var users with the following code:

    IGraphServiceUsersCollectionPage users = graphServiceClient.Users.Request().GetAsync().Result;
    foreach (User user in users)
    {
    Console.WriteLine("Found user: " + user.Id);
    }
    

提交回复
热议问题