Hi there
What PowerShell command can detect if a user/guest user exists in Azure AD? E.g. how to check if someone@gmail.com exists in our AAD?
Thank you.
Hi there
What PowerShell command can detect if a user/guest user exists in Azure AD? E.g. how to check if someone@gmail.com exists in our AAD?
Thank you.
Hi all
In case someone else needs this, I was able to resolve this using https://stackoverflow.com/questions/51946089/powershell-checking-if-an-azure-ad-guest-already-exists
Get-AzureADUser -ObjectId "$($email -replace "@", "_")#EXT#@tenant.onmicrosoft.com"
Thank you all :-)
Hello, you navigate to AAD User and filter Guest and export the list. also you can use Graph to pull the same information.
Hi @Gops
I have to check a list of several hundred users, so need a PowerShell way. Looking for the exact command that can check a user exists in AD as a Guest User.
Thanks so much.
Have you tried using the Get-AzureADUser cmdlet?
Hi @RichMatheisen-8856
Get-AzureADUser works for a user but is not working for Guest Users in AAD. Do you know any PowerShell way to detect a guest user in AD?
Thanks.
Hi all
In case someone else needs this, I was able to resolve this using https://stackoverflow.com/questions/51946089/powershell-checking-if-an-azure-ad-guest-already-exists
Thank you all :-)
Hello,
Below steps will give you all Guest users.
GUI
goto AAD > User > Add filter > User type > Guest > Export all users.
Powershell
Get-AzureADUser -All $true | Where-Object {$_.UserType -eq 'Guest'}
if you would like to validate specific guest ID exist or not then below command will be
Get-AzureADUser -SearchString "guest@gmail.com"
18 people are following this question.