Forum Discussion
How do I share a person one drive file with a service account of azure
To share a OneDrive file with an Azure service account, you can follow these steps:
1.Go to the OneDrive website and sign in with your Microsoft account or your work account.
2.Select the files or folders you want to share by clicking its circle icon.
3.Click Share at the top of the page and choose the link settings.
4.If you’re using OneDrive for work , you can change the link permissions to allow or restrict external sharing.
5.Send the link to the people you want to share with.
However, please note that Azure File Sync does not support syncing between OneDrive and Azure Files. You might want to consider using Azure Files and mounting it on the machines, removing the need for OneDrive altogether.
Regarding your question about item-id, it’s a unique identifier assigned to items when they are created in OneDrive. The ID persists across actions a user performs on the item, so renaming or moving the item will not change its ID.
However, a webUrl cannot be directly converted to an item id. You need to get the item id first using a GET request like:
GET https://graph.microsoft.com/v1.0/me/drive/root/children?$select=id,name, and then download the item file according to the item id using a GET request like GET https://graph.microsoft.com/v1.0/me/drive/items/{item-id}/content.
If I have answered your question, please mark your post as Solved If you like my response, please give it a Like Appreciate your Kudos! Proud to contribute! 🙂 |