Forum Discussion
KirubakaraSen
Jul 13, 2021Copper Contributor
Azure AD - Download users - Missing many users in the export
Hello All, We are downloading the registered Guest users list from Azure portal to track and follow-up on the Invitation registration. In this list, we are missing many users. But when we se...
shehanjp
Iron Contributor
Hi,
Have you used PowerShell by any chance?
Have you used PowerShell by any chance?
KirubakaraSen
Sep 28, 2021Copper Contributor
Hello shehanjp, The issue is resolved. We generated the report with Powershell. thanks.
- Floris_GS1_NLNov 22, 2021Copper ContributorHi, we ran into the same problem. Would have been even more helpfull if you could share the powershell commands you used to get the full/complete list.
- Manoj94Nov 22, 2021Copper ContributorYou can use either Ms graph or Powershell the ps liner is given below:
Get-AzureADUser -Filter "UserType eq 'Guest'" | select DisplayName, Mail- Floris_GS1_NLDec 08, 2021Copper ContributorThank you for your reply. But as often with developers an half answer.
After long searching and many trial and error I found the complete powershell script to get it done.
Get-ExecutionPolicy -List
Set-ExecutionPolicy -ExecutionPolicy remotesigned -scope Process
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Install-Module AzureAD
Get-InstalledModule
Import-Module AzureAD
Connect-AzureAD -Tenant {Your tenant ID}
(also works for Azure B2C)
$users = Get-AzureADUser -All $true
$users | Select-Object -Property Id, GivenName, Surname, { ($_.SignInNames[0] -split '\n')[2] -replace " Value: " } | Export-Csv users.csv