question

RencyJoseph-9234 avatar image
1 Vote"
RencyJoseph-9234 asked saldana-msft edited

Identifying the correct group from permissions object when multiple groups with same name exists.

We access the permission information for SharePoint files using GET /drives/{drive-id}/items/{item-id}/permissions API. Since SharePoint allows 2 groups with the exact same name e.g. Data (1 with email id "data@foo.com" and other with "data1@foo.com") the site groups in permissions (Data Owners, Data Visitors, and Data Members) have the exact same display names and no other information like email/id.
"grantedTo": {
"user": {
"displayName": "Data Owners"
}
},
"grantedTo": {
"user": {
"displayName": "Data Visitors"
}
}
"grantedTo": {
"user": {
"displayName": "Data Members"
}
}

This is the same for both the Data groups, the only difference being the final Data Owners blob which gives the email id of the group it is really associated with as shown below.
"grantedTo": {
"user": {
"email": "data1@foo.com",
"displayName": "Data Owners"
}
}
Q1. Is there any way we could get more information on the site groups in the permissions in this / any other Graph API? We checked the other Graph APIs for permissions available-
GET /groups/{group-id}/drive/items/{item-id}/permissions
GET /me/drive/items/{item-id}/permissions
GET /me/drive/root:/{path}:/permissions
GET /sites/{siteId}/drive/items/{itemId}/permissions
GET /users/{userId}/drive/items/{itemId}/permissions
and all of them give similar information as shown above.

Q2. We edited the email id for the 2nd Data group from data1@foo.com to data123@foo.com. Now, we get data123@foo.com when we pull in the group information but get data1@foo.com in the permissions. Is there any way we could connect the 2 email ids since the group id is also not present in the permissions?

microsoft-graph-sdkmicrosoft-graph-filesmicrosoft-graph-groups
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Adding tag/teams to assist!!

0 Votes 0 ·

1 Answer

StijnTratsaert-6403 avatar image
0 Votes"
StijnTratsaert-6403 answered

Hi,

I am struggling to get this right as well. Did you manage to solve this and if that is the case may ask how?
It is an important objective for us to parse these permissions correctly and the current implementation that is given in the graph API is quite... vague.

Thanks in advance!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.