[BUG] Add-PnPGroupMember for adding EntraID Group using Managed Identity in Azure Runbook doesn't work #3842
Unanswered
PowerRanger83
asked this question in
General
Replies: 1 comment
-
Looks like a server side error, not sure if we can do anything here about this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reporting an Issue or Missing Feature
I am running the following script in my Azure Automation Account runbook:
Powershell 7.2
PnP 2.3.0
Connect-PnPOnline -ManagedIdentity -url "https://tenant.sharepoint.com/sites/MySiteCollection"
$GroupName = Get-PnPGroup -AssociatedMemberGroup
Add-PnPGroupMember -LoginName "user@domain.com" -Group $GroupName
Add-PnPGroupMember -LoginName "c:0t.c|tenant|f559ca209-88d4-4b0a-9c21-0b9c8d453de0" -Group $GroupName
Expected behavior
Add-PnPGroup cmdlet adds the user as well as the EntraID Group to the specified Member Group
Actual behavior
The user gets added but for the EntraID Grouo I get an Error
The specified user c:0t.c|tenant|f559ca209-88d4-4b0a-9c21-0b9c8d453de0 could not be found.
I can verify that that the Groups Object ID exists!
Steps to reproduce behavior
Running the script abvove
What is the version of the Cmdlet module you are running?
2.3.0
Which operating system/environment are you running PnP PowerShell on?
Beta Was this translation helpful? Give feedback.
All reactions