Search code examples
microsoft-graph-apionenoteonenote-api

Create sharing links on OneNote entities - returns empty link


I'm trying to use the onenote-api end point

GET ../api/v1.0/notes/sectionGroups/{sectiongroup-id}/Microsoft.OneNote.Api.GetAnonymousSharingLink(accessLevel=Microsoft.OneNote.Api.SharingLinkAccessLevel’View’)

This returns

HTTP/1.1 200 Ok

{ "@odata.context":"https://www.onenote.com/api/v1.0/$metadata#Edm.String", "value":"" }

X-CorrelationId: 8c2eed73-84f4-4385-83eb-ac1a0c2d5479

Date: Tue, 13 Mar 2018 13:57:22 GMT

Any ideas on how to return an actual link?

Cheers
Steve


Solution

  • Have you set it already? If not, you will need to first call POST ~/sectiongroups/{id}/GetOrCreateAnonymousSharingLink with {"accessLevel":"View"} in the body