Forum Discussion
ktc2
Feb 21, 2025Copper Contributor
A little help please with Get-AzADObject
I am trying to write a PowerShell script that will list the users who hold specified Azure roles into a .csv file for security reviews. I'm new to PowerShell and I'm struggling with this for far too ...
kcelmer
Feb 24, 2025Copper Contributor
I greatly appreciate your help. This results in a series of the below error:
Get-AzADUser:
Line |
20 | $principal = Get-AzADUser -ObjectId $principalId -ErrorAction …
| ~~~~~~~~~~~~
| Cannot bind argument to parameter 'ObjectId' because it is an empty string.
Should I change Principal to PrincipalID everywhere?