You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Sharing NG] getting permissions for drive via driveId doesn't work #8351
Permissions of a drive currently can't be fetched when using the driveId as itemId.
Steps to reproduce
Create a drive
Try fetching permissions for that drive via the drive's id: curl "https://localhost:9200/graph/v1beta1/drives/{drive-id}/items/{drive-id}/permissions" -u admin:admin -vk | jq
Expected behavior
The permissions for that drive should be returned by the server.
Actual behavior
The server complains about an invalid itemId. This probably happens because the driveId only consists of 2 parts and is missing the nodeId as third part. Appending the last part of the driveId as nodeId works. But consumer of the API shouldn't need to care about id formats.
Tested for the personal space. It works properly /graph/v1beta1/drives/storage-users-1$some-admin-user-id-0000-000000000000/items/storage-users-1$some-admin-user-id-0000-000000000000!some-admin-user-id-0000-000000000000/permissions
What format did you use?
Tested for the personal space. It works properly /graph/v1beta1/drives/storage-users-1$some-admin-user-id-0000-000000000000/items/storage-users-1$some-admin-user-id-0000-000000000000!some-admin-user-id-0000-000000000000/permissions What format did you use?
Permissions of a drive currently can't be fetched when using the driveId as itemId.
Yes a driveId is not itemId. So this is kind of expected I guess. Having that endpoint accept driveId as itemId shouldn't be to hard, however I think we would be better of implementing:
GET /graph/v1beta1/drives/{driveId}/root which basically returns the drives root item, and /graph/v1beta1/drives/{driveId}/root/permissions which would return the permissions.
GET /graph/v1beta1/drives/{driveId}/root which basically returns the drives root item, and /graph/v1beta1/drives/{driveId}/root/permissions which would return the permissions.
So Web would need to make an extra call to /graph/v1beta1/drives/{driveId}/root just to retrieve the correct itemId?
Activity
2403905 commentedon Feb 14, 2024
Tested for the personal space. It works properly
/graph/v1beta1/drives/storage-users-1$some-admin-user-id-0000-000000000000/items/storage-users-1$some-admin-user-id-0000-000000000000!some-admin-user-id-0000-000000000000/permissionsWhat format did you use?
saw-jan commentedon Feb 15, 2024
Yeah, this works. But the issue is about using:
rhafer commentedon Mar 7, 2024
Yes a
driveIdis notitemId. So this is kind of expected I guess. Having that endpoint acceptdriveIdasitemIdshouldn't be to hard, however I think we would be better of implementing:GET /graph/v1beta1/drives/{driveId}/rootwhich basically returns the drives root item, and/graph/v1beta1/drives/{driveId}/root/permissionswhich would return the permissions.JammingBen commentedon Mar 15, 2024
So Web would need to make an extra call to
/graph/v1beta1/drives/{driveId}/rootjust to retrieve the correctitemId?micbar commentedon Mar 15, 2024
Ralf is trying to make the item id obsolete for space roots.
The /root url part is basically an alias for the item id of the space root
feat(graph): add POST /drive/<id>/root/invite suppport
feat(graph): add GET /drive/<id>/root/permissions suppport
feat(graph): add POST /drive/<id>/root/invite suppport
feat(graph): add GET /drive/<id>/root/permissions suppport
7 remaining items
feat(graph): add POST /drive/<id>/root/invite suppport
feat(graph): add GET /drive/<id>/root/permissions suppport
feat(graph): add more /<driveid>/root/ endpoints
feat(graph): add POST /drive/<id>/root/invite suppport
feat(graph): add GET /drive/<id>/root/permissions suppport
feat(graph): add more /<driveid>/root/ endpoints
feat(graph): add POST /drive/<id>/root/invite suppport
feat(graph): add GET /drive/<id>/root/permissions suppport
feat(graph): add more /<driveid>/root/ endpoints
feat(graph): add more /<driveid>/root/ endpoints
feat(graph): add GET /drive/<id>/root/permissions suppport
feat(graph): add more /<driveid>/root/ endpoints
feat(graph): add POST /drive/<id>/root/invite suppport