Home

Get details of all external users from the complete SharePoint online tenant

%3CLINGO-SUB%20id%3D%22lingo-sub-1115513%22%20slang%3D%22en-US%22%3EGet%20details%20of%20all%20external%20users%20from%20the%20complete%20SharePoint%20online%20tenant%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1115513%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20export%26nbsp%3Bdetails%20of%20all%20external%20users%20from%20the%20complete%20SharePoint%20online%20tenant.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESince%20the%20out%20of%20the%20box%20command%20just%20generates%2050%20users%2C%20I%20am%20trying%20the%20following%20command%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETry%20%7B%3CBR%20%2F%3EFor%20(%24x%3D0%3B%3B%24x%2B%3D50)%20%7B%3CBR%20%2F%3E%24ExternalUsers%20%2B%3D%20Get-SPOExternalUser%20-PageSize%2050%20-Position%20%24x%20-ErrorAction%20Stop%20%7C%20Export-csv%20C%3A%5Ctemp%5CExternalusers.csv%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3CBR%20%2F%3ECatch%20%7B%7D%3CBR%20%2F%3E%24ExternalUsers%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehowever%20I%20want%20to%20export%20it%20to%20csv%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20assist%20in%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1115513%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2016%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eexternal%20user%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eexternal%20user%20access%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFiles%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Test SharePoint
Contributor

I am trying to export details of all external users from the complete SharePoint online tenant.

 

Since the out of the box command just generates 50 users, I am trying the following command:

 

Try {
For ($x=0;;$x+=50) {
$ExternalUsers += Get-SPOExternalUser -PageSize 50 -Position $x -ErrorAction Stop | Export-csv C:\temp\Externalusers.csv
}
}
Catch {}
$ExternalUsers

 

 

however I want to export it to csv?

 

Can someone assist in this?

 

 

1 Reply
Related Conversations
Share Button added to the Toolbar!
HotCakeX in Discussions on
13 Replies
Make Share function in Edge more useful
HotCakeX in Discussions on
2 Replies
API access to the new Project Online
BenjaminMel in Project on
2 Replies
Issue when accessing enterprise resource pool
cmill262 in Project on
4 Replies
Last Log In Activity on Microsoft Project?
Devryk in Project on
0 Replies