PnP icon indicating copy to clipboard operation
PnP copied to clipboard

Add-PNPGroupMember results in "System.UnauthorizedAccessException"

Open Tom-CK opened this issue 4 years ago • 3 comments

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.

Tom-CK avatar Feb 23 '21 17:02 Tom-CK

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

mariolonghi avatar Feb 24 '21 23:02 mariolonghi

N954-5494001

On Wed, Feb 24, 2021, 6:08 PM Mario Longhi [email protected] wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pnp/PnP/issues/1927#issuecomment-785453985, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQOIALDBJ5ZT7SQOJLDKFSTTAWBHFANCNFSM4YC6BKRQ .

tyrell677 avatar Feb 25 '21 00:02 tyrell677

Any progress on this issue ?

Tom-CK avatar Mar 17 '21 14:03 Tom-CK