The collection type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' on 'Microsoft.Graph.GraphServiceUsersCollectionResponse.Value' is not supported

后端 未结 3 899
無奈伤痛
無奈伤痛 2021-01-27 01:05

I am trying to get list of Azure AD B2C users based on code sample provided Here.

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var us         


        
3条回答
  •  醉梦人生
    2021-01-27 01:38

    Weirdly enough, I ran into this problem when I upgraded the following packages:

    1. Microsoft.Graph
    2. Microsoft.Graph.Core

    Initially, I was not sure why this error would have occurred.

    To resolve it, I first tried Uwe Kleim's solution and ran Update-Package -Reinstall. That did not work, but it did reinstall the package, so it may have helped (keep reading).

    Next, I reverted the upgrade on the packages. I reverted Microsoft.Graph first and then did a rebuild. The problem still existed. So, I reverted the upgrade on Microsoft.Graph.Core and the problem went away. I then upgraded Microsoft.Graph and then did a rebuild. This time, the error went away AND when I went to upgrade Microsoft.Graph.Core, it was not available to be upgraded. So, it must have been upgraded with Microsoft.Graph.

    My best bet as to the root cause: I upgraded the packages in the wrong order and Visual Studio did not like that.

提交回复
热议问题