Hello Robu 1,
Thank you very much for the response, which is appreciated. :-)
On the face of it, it looked promising.
I've never had any problem mapping Domain Groups to SharePoint Groups, but I'm still having issues mapping SharePoint Groups to Document Libraries (which you'd think would actually be simpler?!)
I have followed through the instructions, but I seem to be failing at the second step.
With a Document Library named, for example, Test Library LTD (inheritance broken, SharePoint Group deployed), the first step
_api/web/GetFolderByServerRelativeUrl('{library_relative_url}')
returns (reduced)
"body": {
"d": {
"Files":
"ListItemAllFields":
"ParentFolder":
"Properties":
"StorageMetrics":
"Folders":
"Exists": true,
"ExistsAllowThrowForPolicyFailures": true,
"ExistsWithException": true,
"IsWOPIEnabled": false,
"ItemCount": 59,
"Name": "TestLibraryLTD",
"ProgID": null,
"ServerRelativeUrl": "/teams/300862/TestLibraryLTD",
"TimeCreated": "2021-10-06T13:29:48Z",
"TimeLastModified": "2024-11-26T14:16:46Z",
"UniqueId": "664df9e4-e77e-4877-912a-43e7a1f52722",
"WelcomePage": ""
}
}
}
but drilling into the /ListItemAllFields returns:
<d:ListItemAllFields xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:null="true"/>
where the response is "null".
I've found a workaround, that seems to work in most cases:
_api/web/lists/GetByID('9be82e50-92f2-45eb-80e7-62e2ac6bb0ba')/RoleAssignments
where GetByID is the ID of the Document Library.
This returns the Principal ID in the results (reduced):
"results": [
{
"__metadata":
"Member":
"RoleDefinitionBindings":
"PrincipalId": 3
}​​​​​​​