-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-MgSite and Get-MgSubSite need to return the Permissions property #600
Comments
Thanks for opening this bug. I can indeed confirm that the SDK is missing |
For driveItems, we will need to wait for |
Thanks Peter!
I found some commands to gather permissions but I am betting that they will
be better and faster using Graph. The statements I found for Library
permissions on Stack Exchange don't report just the library
permissions either, they are reporting the Sites permissions. I might have
to manually check the permissions for each of my libraries that report
broken inheritance. At least I have that!
Kathy Blasco
…On Wed, Mar 31, 2021 at 6:09 PM Peter Ombwa ***@***.***> wrote:
For driveItems, we will need to wait for
drives/driveItem/{driveItem-id}/permissions to be added the OpenAPI
document that this SDK is generated from. This can be tracked here
microsoftgraph/microsoft-graph-devx-api#509
<microsoftgraph/microsoft-graph-devx-api#509>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#600 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHTMJGUXUJ2ODAZP43W6UPLTGOTTDANCNFSM42CIGA2A>
.
|
@kathyblasco, as a workaround, you could use # Authenticate as usual.
Connect-MgGraph
# Get site permissions
Invoke-MgGraphRequest -Uri "v1.0/sites/$SiteId/permissions"
# Get driveItem permissions
Invoke-MgGraphRequest -Uri "v1.0/drives/$DriveId/items/$DriveItemId/permissions"
|
I would (and I already tried that) except that the graph Permissions call
isn't working either! That was also reported in a Q and A but I have not
gotten a response on that either! I think I posted wrong though as it was
my issue already posted by someone else.
https://docs.microsoft.com/en-us/answers/questions/307911/graph-api-sharepoint-site-permissions-operation-no.html
Kathy Blasco
…On Thu, Apr 1, 2021 at 10:50 AM Peter Ombwa ***@***.***> wrote:
@kathyblasco <https://github.com/kathyblasco>, as a workaround, you could
use Invoke-MgGraphRequest to list site and driveItem permissions like
this:
# Authenticate as usual.Connect-MgGraph
# Get site permissionsInvoke-MgGraphRequest -Uri "v1.0/sites/$SiteId/permissions"
# Get driveItem permissionsInvoke-MgGraphRequest -Uri "v1.0/drives/$DriveId/items/$DriveItemId/permissions"
Invoke-MgGraphRequest is a command that we recently added to the SDK for
making arbitrary requests to Graph.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#600 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHTMJGQXFLLETVHPE5FA2ADTGSI3HANCNFSM42CIGA2A>
.
|
I updated Microsoft.Graph to 1.10.0 but permissions output are still empty after running PS C:\Windows\system32> Get-Module ModuleType Version Name |
The command works as expected in v1.10.0: Please note that the API only supports application permissions. See https://docs.microsoft.com/en-us/graph/api/site-list-permissions?view=graph-rest-1.0&tabs=http#permissions. See https://docs.microsoft.com/en-us/powershell/microsoftgraph/app-only?toc=%2Fgraph%2Ftoc.json&view=graph-powershell-1.0&viewFallbackFrom=graph-rest-1.0&tabs=azure-portal for how to use app-only authentication with the PowerShell SDK. |
I am not sure why this issue was closed. This is still not resolved. Generally, we don't need permissions to the Root site. WE need permissions to the sites we have created. The Owner/Member/Visitor groups of each individual site. I understand if the sub library or broken inheritance is taken away, but this top level permissions should be seen. Nor taking the Site ID as a variable or direct. The permissions still don't appear. |
@peombwa Please reopen this issue. |
The simplest and clearer method I've found to show the existing permissions is by using ToJsonString() method:
|
Permissions is a propery in both Get-MgSite and Get-MgSubSite but no data is returned for Permssions. Tried both commands using '-ExpandProperty' and '-Property' and there is still no data in the Permissions Property. I also need Permissions returned for Libraries, Files, and Folders.
See: https://docs.microsoft.com/en-us/answers/questions/336355/has-anyone-been-able-to-retrieve-site-permissions.html
Maybe what is needed is to develop the Graph Permissions module as described by: https://docs.microsoft.com/en-us/graph/api/site-list-permissions?view=graph-rest-1.0&tabs=http
Are there any plans to provide SharePoint permissions at any level in upcoming versions?
AB#8791
The text was updated successfully, but these errors were encountered: