Forum Discussion
List of all External Users Using Powershell
I tried this below command to get all external users but it return nothing.
I went to Admin Portal and filter users as Guest user it also not there.
One particular user having gmail id is not there in the admin portal as well as below command is not returning anything.
$orgName="mytenant"
Connect-SPOService -Url "https://$orgName-admin.sharepoint.com" -Credential "user@tenance.com
#get all external users by running
get-spoexternaluser -SiteUrl "https://tenant.sharepoint.com/"
3 Replies
- ExpiscornovusIron Contributor
Deleted, another option which might be useful is using the Audit log search of the Security & Compliance Center. I don't know if you have activated that option in your tenant?
When you have you could run a report based on the Created sharing invitation activity. Besides the names of the external users you can also see who has sent out the sharing request, which object has been shared and when this sharing request is going to expire.
- Beat GrüringBrass Contributor
With the SiteUrl parameter you are filtering the users to the root site.
Try querying the users without this parameter.
Just use:
get-spoexternaluser
- Deleted
Beat Grüring Thanks for your reply, I tried but no luck.
Expiscornovus I tried but I have no access to get compliance.