entra-powershell icon indicating copy to clipboard operation
entra-powershell copied to clipboard

Get-EntraUser | Add-EntraGroupMember doesn't work

Open alexandair opened this issue 1 year ago • 2 comments

Get-EntraUser -UserId <GUID>| Add-EntraGroupMember -GroupId <GUID> fails with error New-MgGroupMember_CreateExpanded: Invalid object identifier 'Microsoft.Graph.PowerShell.Models.MicrosoftGraphUser'.

Instead of the whole object you need to pipe just user's ID to make pipeline work.

alexandair avatar Oct 06 '24 21:10 alexandair

Thanks, @alexandair, for bringing this up!

We have prioritized breaking the module into modular components. This will be fixed as part of a larger work item for pipelining patterns described in this issue - https://github.com/microsoftgraph/entra-powershell/issues/746 (you are familiar with this item 💯)

SteveMutungi254 avatar Oct 22 '24 17:10 SteveMutungi254

Hi, @alexandair,

We've made this a priority and will keep you updated on our progress.

Thank you!

SteveMutungi254 avatar Jan 23 '25 12:01 SteveMutungi254

Tested in v1.10.0 and it works

KenitoInc avatar Aug 07 '25 08:08 KenitoInc