[Java] Is there a way to create a GraphServiceClient using an access token fetched using the API instead of the SDK?

blam 36 Reputation points
2022-11-24T05:31:23.707+00:00

Hello, I already have an access token fetched previously. I'd like to create a GraphServiceClient using that access token, however I can't seem to find any constructor of TokenCredentialAuthProvider that would let me do this. Is there another class I can use?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,420 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 2022-11-28T05:21:52.153+00:00

    Here is the way to Customize the Microsoft Graph SDK service client:

    264642-image.png

    For more information :https://learn.microsoft.com/en-us/graph/sdks/customize-client?tabs=java

    ----------

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments