How to get all guests users in an Office 365 tenant using PowerShell Azure AD

This script allows to get all the guests users in an Office 365 tenant by using PowerShell for Azure AD. The script defines a function that uses Get-AzureADuser cmdlet to get all the Guests users in an Office 365 tenant by applying the filter usertype eq 'Guest'. Once the guest

 
 
 
 
 
(0)
1,406 times
Add to favorites
Office 365
7/2/2017
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Filtering on email domain
    2 Posts | Last post July 14, 2019
    • Thanks for the script!
      
      How would I filter the output to only include Guest users from specific email domains?
    • Inside the foreach loop just add a Switch case clause where you can add the condition for the email domains you want to filter
  • Is it possible to get who invited a particular guest user in Azure AD ?
    1 Posts | Last post May 10, 2019
    • Following cmdlet gets me guest users in Azure AD tenant, I need to find out who invited a particular guest user, is it possible to view this information, please suggest  ?
      
      Get-AzureADUser -Filter "Usertype eq 'Guest'”
      
  • Suggestion
    2 Posts | Last post September 30, 2017
    • Please add -All 1 to the cmdlet get-azureaduser, else it will only list first 100 and not all guests in tenant.
    • Thanks for the tip!!!