Translate
How to retrieve Container ID from sharePoint through Microsoft Graph API
Hello,
I am trying to access the members of a sharePoint group through Microsoft Graph API. To do this, I am suppose to use the following beta route: https://learn.microsoft.com/en-us/graph/api/sharepointgroup-get?view=graph-rest-beta&tabs=http
This route requires to know the fileStorageContainerId associated to the sharePoint group. My issue is to retrieve this id.
I have tried to use this route: https://learn.microsoft.com/en-us/graph/api/filestorage-list-containers?view=graph-rest-1.0&tabs=http that is supposed to list all containers. But, again, this route requires to filter based on the containerTypeId. I have then found no way to retrieve such containerTypeId.
In this documentation (https://learn.microsoft.com/en-us/sharepoint/dev/embedded/getting-started/containertypes#standard-container-types-non-trial), it explain how to create a container type with a specific type id but that's not my goal. I just want to be able to retrieve the member of my sharePoint groups through the API.
I also have seen this command from SharePoint Online Shell that could maybe be useful: https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/get-spocontainer?view=sharepoint-ps. But unfortunately I am working an a Mac.
At this point, I have absolutely no idea on how I can proceed further. It seems impossible to retrieve this container id. Do you have any way to help me ? I find it astonishing (in a really bad way) that such easy task as the one I describe (retrieving member of a sharePoint group) is so difficult to put in place. The documentation of Microsoft needs a serious rework.
Thanks for your answer,
Nikita de Broux