'Microsoft Graph, Permissions, Create Sharing Link for DriveItem, type:view not working

The docs here https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createlink claim that you can create a read-only Sharing Link by setting "type" to "view" in the request.

I have done so, and received the expected response with the expected "webUrl" and "type". However, when I visit the webUrl link (for DOCX files), I am taken to an online version of Word that allows me to edit the SharePoint Online file. That is, I appear to have a read-write Sharing Link rather than a read-only Sharing Link.

What am I missing?

Thank you, James.



Solution 1:[1]

According to your description, I presume you want to create a Share Link for a SharePoint Online File.

Based on my test, we can create the read-only Sharing Link. When we access to the sharing file with the current user, it will be read-write Sharing Link because the Sharing file is your own file.

And if we use another account to access this file or open the Sharing Link in another browser, it will be read-only.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Keen Jin