I have registered Remote Event Receivers on my SharePoint list. I can receive remote events in my custom code.

Is it possible to receive Microsoft Graph AccessToken from SharePoint ContextToken?

I have to retrieve some data from Microsoft Graph in the context of the logged-in user.

I know that I can use client id and client secret for it but I want to store correct value for Author and Editor field instead of System Account.


You're not able to operate under a specific account until the corresponding user provided delegated permissions to your Azure app. So, first, you must register an Azure app, request delegated permissions from each user you want to get access on behalf of, and save access and refresh tokens on your side. Then, you can make requests with those tokens.

Find more info here: https://docs.microsoft.com/en-us/graph/auth-v2-user

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.