Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Add-PNPGroupMember results in "System.UnauthorizedAccessException" #1927

Open
Tom-CK opened this issue Feb 23, 2021 · 3 comments
Open

Add-PNPGroupMember results in "System.UnauthorizedAccessException" #1927

Tom-CK opened this issue Feb 23, 2021 · 3 comments

Comments

@Tom-CK
Copy link

Tom-CK commented Feb 23, 2021

Hi,

simply doing a

Connect-PNPOnline -Url https://...... -UseWebLogin -ReturnConnection

followed by a

Add-PnPGroupMember -LoginName "[email protected]" -Group "Name of my group"

results in an exception:
{"odata.error":{"code":"-2147024891, System.UnaothrizedAccessException","message" .... "value: Access denied- You do not have perission to perform this action"}

Doing the same as the same user using the GUI (Browser) works fine (User is Site-Owner).

Pnp.PwoerShell Version 1.3

The code was working before updating to 1.3 and changing from Add-PnPUserToGroup to Add-PnPGroupMember.

Went back to Version 1.2.0 - everything works well.

@mariolonghi
Copy link

Also getting this error. Contacting with MS support since I couldn't find a way to open an issue here.
Now I found it by googling.

Note that I also have the same issue with the command:
Set-PnPGroupPermissions

@tyrell677
Copy link

tyrell677 commented Feb 25, 2021 via email

@Tom-CK
Copy link
Author

Tom-CK commented Mar 17, 2021

Any progress on this issue ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants