You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue when getting a drive item via /shares endpoint. After listing drive items via /me/drive/root/children and using encoded webUrl in /shares endpoint (as described here ) graph api returns "invalidRequest: Invalid shares key." error. After some investigation I found that webUrl of drive items changed about 2-3 weeks ago. Before, listing drive items (like xlsx files) would return webUrl similar to: https://onedrive.live.com/personal/946c98d07c563ce7/_layouts/15/doc.aspx?resid=946C98D07C563CE7!381&cid=946c98d07c563ce7
So only resid is different, and after encoding current webUrl and using it in /shares endpoint graph api returns an error.
I tested this with Postman, so it doesn't seem like SDK issue, but it is weird that webUrl changed, yet I am unable to find any change logs regarding this. To access graph api I am using OAuth2.0 access token with "Files.ReadWrite offline_access" scopes. Is there some changes I need to make to my Entra application that I am using in OAuth2.0 flow to return webUrl as it was before? If not, how can I use the new webUrl in the /shares endpoint without manually editing it? It is vital for me to use /shares endpoint.
Thank you.
The text was updated successfully, but these errors were encountered:
Any chance you can post the question at the link below to get feedback from the API owners? As this repo is mainly intended for SDK related issues, we may not be best placed if the change was intended. It would be great if you could post back the link of the query as a comment so that anyone who comes across this may find it as well.
I encountered an issue when getting a drive item via /shares endpoint. After listing drive items via /me/drive/root/children and using encoded webUrl in /shares endpoint (as described here ) graph api returns "invalidRequest: Invalid shares key." error. After some investigation I found that webUrl of drive items changed about 2-3 weeks ago. Before, listing drive items (like xlsx files) would return webUrl similar to:
https://onedrive.live.com/personal/946c98d07c563ce7/_layouts/15/doc.aspx?resid=946C98D07C563CE7!381&cid=946c98d07c563ce7
Now, however, webUrl looks similar to:
https://onedrive.live.com/personal/946c98d07c563ce7/_layouts/15/doc.aspx?resid=7c563ce7-98d0-206c-8094-7d0100000000&cid=946c98d07c563ce7
So only resid is different, and after encoding current webUrl and using it in /shares endpoint graph api returns an error.
I tested this with Postman, so it doesn't seem like SDK issue, but it is weird that webUrl changed, yet I am unable to find any change logs regarding this. To access graph api I am using OAuth2.0 access token with "Files.ReadWrite offline_access" scopes. Is there some changes I need to make to my Entra application that I am using in OAuth2.0 flow to return webUrl as it was before? If not, how can I use the new webUrl in the /shares endpoint without manually editing it? It is vital for me to use /shares endpoint.
Thank you.
The text was updated successfully, but these errors were encountered: