I am new to using Powershell, and I am using it to set up an off-boarding process at my company. I initially used the AzureAd module, but that will be deprecated soon. I am using \"<\/p>\n
Advertisement
Connect-AzAccount -Credential $credential\" to connect. After that, I am using<\/p>\n
Advertisement
“$userId = Get-AzAdUser -UserPrincipalName $LeaverEmail” to pull the user id or the Azure user. When I used this method, the $userid variable returned “Microsoft.Azure.Commands.ActiveDirectory.PSADUser.” I will attach a screenshot of the code.