Closed
Description
Is your feature request related to a problem? Please describe.
When developers want to call graph to call an app only method, the current GraphServiceClient cannot be used as it uses GetTokenForUserAsync. See
number of customers hitting this issue so far: 2
Describe the solution you'd like
Have a way to call app only methods (corresponding to App-only scopes)
Describe alternatives you've considered
- enable a second GraphServiceClient to be injected (with a different type ?). Maybe a class named
AppOnlyGraphServiceClient
which would have only one property which would be the GraphServiceClient, or which would inherit from GraphServiceClient. - have an extension method on GraphServiceClient which would specify that the developer wants to have an app-only and then use it GetTokenForUserAsync. See
Additional context
See the ASP.NET Core Graph web hooks sample where the GraphServiceClient can only be used for delegated scopes: