简体   繁体   中英

Get all users in sharepoint online

Goal: Using powershell, get all users and their AboutMe property values from sharepoint online user profile.

Problem Tried Get-SPOUser , followed MS TechNet: Get-SPO User , also tried TechNet Script , but it only returns a few admin users, not all users.

I believe this is because all user accounts in SPO are like this:

i:0#.f|membership|doris.lee@contoso.com 

I need to loop through claim based collection instead of basic SPO-User collection. I am not sure which object or collection has "i:0#.f|membership|doris.lee@contoso.com" and how to access it?

Getting all users is simple :

Get-SPOUser -Site 'https://TenantName-my.sharepoint.com/'

AFAIK : getting the AboutMe property isn't that hard, but it does require using the SPO REST API or CSOM (and that involves quite some code to get the login flow properly : after that getting data out of the API is quite trivial)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM