Not sure if this is exactly what you're looking for but I used this CSOM code in Powershell to enumerate all users from the Profile Store and dump their details into a list. You could convert this into an SP.js script and run from inside a Script Editor or Content Editor WP.
- Create a list with fields for the properties you need
- Modify the script from
$NewListItem to update the fields with whatever properties you require from $userprofile and $upp (they both have different properties, I've included the links for the namespace references); or do whatever else you need with the properties, like printing to screen
It can probably be optimised a fair bit but the runtime is pretty decent against O365 so should be better for on-premise.
#Import the required DLL
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.UserProfiles")
# Set the root Mysite URL to get profiles from (i.e. your Mysite web app)
$msite = 'https://spe551120-my.sharepoint.com'
# Set the user to run the query. Must be a Sharepoint Admin.
$admin = 'user@tenant'
# Set the password.
$password = ConvertTo-SecureString "yourPassword" -AsPlainText -Force
#Get the Client Context and Bind the Site Collection
$context = New-Object Microsoft.SharePoint.Client.ClientContext($msite)
#Authenticate
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($admin,$password)
$context.Credentials = $credentials
#Fetch the users in Site Collection
$users = $context.Web.SiteUsers
$context.Load($users)
$context.ExecuteQuery()
#Create an Object [People Manager] to retrieve profile information
$people = New-Object Microsoft.SharePoint.Client.UserProfiles.PeopleManager($context)
$userIndex = 1;
Foreach($user in $users)
{
# The $userprofile object contains some properties
# https://msdn.microsoft.com/en-gb/library/microsoft.sharepoint.client.userprofiles.personproperties_members.aspx
$userprofile = $people.GetPropertiesFor($user.LoginName)
$context.Load($userprofile)
$context.ExecuteQuery()
# To get the more advanced properties for some reason we need to use this method
# https://technet.microsoft.com/en-us/library/hh147513(v=office.14).aspx
$upp = $userprofile.UserProfileProperties;
# Load the list
# Set the URL for the site where the target list lives
$uSite = "https://spe551120.sharepoint.com"
$uContext = New-Object Microsoft.SharePoint.Client.ClientContext($uSite)
$ucredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($admin , $password)
$ucontext.Credentials = $ucredentials
# Set the name of the list where profile info lives
$DocLib = "DS_HaveYouMet"
$List = $uContext.Web.Lists.GetByTitle($DocLib)
$uContext.Load($List)
$uContext.ExecuteQuery()
# Create and populate list item - when setting a field via $NewListItem you need to use the Static Name of the field (i.e. what it was when first created), not the Display Name. Replace 'property' with whatever property of $userprofile or $upp you need (see class references for a list of available ones)
$ListItemCreationInformation = New-Object Microsoft.SharePoint.Client.ListItemCreationInformation
$NewListItem = $List.AddItem($ListItemCreationInformation)
$NewListItem["fieldName"] = property;
$NewListItem.Update()
$uContext.load($newlistitem)
$uContext.ExecuteQuery()
$userIndex = $userIndex + 1;
}