0
votes

Does anyone have experience using the OneDrive api?

I want to be able to create a password protected link to a folder in my OneDrive using the Microsoft Graph api. The api seems to have a CreateLink action that can create a link but it doesn't seem to document that I can include a password when it is created.

Does anyone know if you can create password protected links via the Microsoft Graph api?

I've include the URL to the documentation I am looking at.

https://docs.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http

Many thanks in advance.

Rhyd.

1

1 Answers

0
votes

It's exposed on the beta endpoint but not yet on v1.0. Check out the following documentation:

https://docs.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-beta

Hopefully it'll be pushed to v1.0 soon.

Update 2019-07-12
The documentation for createLink appears to be lacking in beta with respect to password support. A request like the following should work though:

POST /me/drive/items/{itemId}/createLink
Content-type: application/json

{
  "type": "view",
  "scope": "anonymous",
  "password": "itsasecret"
}