1
votes

I'm trying to avoid sign-in for this case where I have a refreshed Oauth2 access token. I want to show the office365 document viewer in a browser without sign-in using the token. The webUrl looks like this: https://[...].sharepoint.com/personal/[...]/_layouts/15/Doc.aspx?sourcedoc=[...]&file=my-powerpoint.pptx&action=embedview&mobileredirect=true

Ideally I'd like to pass access_token=[...] as a query param to use it in an IFrame, but even being able to set it as an (header) Authorization Bearer token for use in a tab would be a fallback.

I have (both implicit- and code-flow) access tokens that work for the sharepoint REST API, but they will not work as an Authorization Bearer token for fetching the webUrl. It seems that the webUrls just don't want to respect OAuth2 tokens. (They do seem to like the FedAuth cookie.)

Any help would be appreciated.

1
This isn't supported.Marc LaFleur

1 Answers

0
votes

I notice that MS Graph Beta has a solution. I tried it an it works perfectly. https://docs.microsoft.com/en-us/graph/api/driveitem-preview?view=graph-rest-beta