Forum Discussion

Ivan Palikuca's avatar
Ivan Palikuca
Copper Contributor
May 29, 2019
Solved

Graph API to invite user works only under "root"

I am trying to use Graph API to invite user to a folder that is hosted in SharePoint Online. I am using following API:   https://graph.microsoft.com/v1.0/groups/{groupId}/drive/items/{itemId}/invit...
  • Kevin_Morgan's avatar
    Jun 03, 2019

    Ivan Palikuca 

     

    I have tested the case, both cases are working fine in my end. Actually you have to replace the {itemId} by <sub folder id> and you should not include the sub folder name (General) in graph url.

     

    For example :

     

    https://graph.microsoft.com/v1.0/groups/{groupId}/drive/items/{folder_Id}/invite

     

    https://graph.microsoft.com/v1.0/groups/{groupId}/drive/items/{sub_folder_Id}/invite

     

    You should not provide like below URL :

     

    https://graph.microsoft.com/v1.0/groups/{groupId}/drive/items/General/{sub_folder_Id}/invite

     

Resources