6

I have to create an calendar event in Outlook 365 from SharePoint Online. I know that I can achieve this using https://graph.microsoft.com/v1.0/me/events call in Microsoft Graph API.

The only problem I am facing is in authentication. Can I use the token from SharePoint Online and authenticate Outlook 365 and create an event there? If yes, then how can I get that token and use that for authenticating outlook 365 for Microsoft Graph API?

I don't want any more sign in window to authenticate.

Any suggestions are most welcome.

2
  • 1
    Have you been able to figure out any work around for this problem?
    – Farhan
    Mar 9, 2019 at 16:06
  • I actually ended up using Sign-In window to get the authentication token. Mar 11, 2019 at 4:16

1 Answer 1

0

@Aakash Maurya,

I think it's possible to avoid prompting login window again. You can take a reference of OAuth 2.0 On-Behalf-Of flow:

enter image description here

And another possible solution is to use refresh token:

Although access token only against one resource, its refresh token is valid for all permissions that your client has already received consent for - thus, a refresh token issued on a request for scope=mail.read can be used to request a new access token for scope=api://contoso.com/api/UseResource.

BR

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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