Forum Discussion
Shayne Wright
Jun 16, 2017Copper Contributor
Bulk load Azure AD Users
Hi We use AD Connect to sync our own AD accounts with our Azure AD, but require a method to bulk load 'in cloud' only accounts for our external users. So I have a few quick questions if you pleas...
- Jun 16, 2017
Not UI, or Graph, but I use PowerShell and it is quite simple:
$UserName = "" $Password = "" $SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $SecurePassword Connect-MsolService -Credential $Credential $NewUser = New-MsolUser -UserPrincipalName "user@company.com" -DisplayName “Test User” -FirstName “Test” -LastName “User”
This is just for one user, just do a simple read CSV and a for loop if you want to automate a bunch
All attribute options documented here:
https://docs.microsoft.com/en-us/powershell/module/msonline/new-msoluser?view=azureadps-1.0
Brent Ellis
Jun 16, 2017Silver Contributor
Not UI, or Graph, but I use PowerShell and it is quite simple:
$UserName = "" $Password = "" $SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $SecurePassword Connect-MsolService -Credential $Credential $NewUser = New-MsolUser -UserPrincipalName "user@company.com" -DisplayName “Test User” -FirstName “Test” -LastName “User”
This is just for one user, just do a simple read CSV and a for loop if you want to automate a bunch
All attribute options documented here:
https://docs.microsoft.com/en-us/powershell/module/msonline/new-msoluser?view=azureadps-1.0