Power BI

Content by Charles Sterling

Creating Users in an Azure AD in Bulk

As part of the Unicorn Project i need to create a bunch of users en mass in my AAD.

Turns out it is with Excel is actually very easy.

Step 1. Download Microsoft Online Services Sign-In Assistant for IT Professionals RTW

https://www.microsoft.com/en-us/download/confirmation.aspx?id=41950

 

(note i have found an issue when installing the AD module it is not ‘seeing’ the in Sign in Assistant and using the beta resolved it:

https://www.microsoft.com/en-us/download/details.aspx?id=39267 )

 

Step 2 Download Azure Active Directory Module for Windows PowerShell

Azure Active Directory Module for Windows PowerShell (64-bit version)

Step 3 I created a quick XLS to create the New-MsolService Commands

Here is the formula i used:

=”New-MsolUser -UserPrincipalName ” & B1 & “@partsunlimited.onmicrosoft.com -DisplayName ” & B1 & ” -FirstName ” & B1 & ” -LastName ” & B1 & ” -Password  ” & C1 & ”  -PasswordNeverExpires $true -AlternateEmailAddresses chass@microsoft.com”

Step 4 Run the following Powershell Commands in Azure Power shell console

Get-Credential

Connect-MsolService

Paste in the values from Excel…like the following:

New-MsolUser -UserPrincipalName Unicorn131@partsunlimited.onmicrosoft.com -DisplayNameUnicorn131 -FirstName Unicorn131 -LastName Unicorn131 -Password Password1 -PasswordNeverExpires $true -AlternateEmailAddresses chass@microsoft.com

 

 

 

Not certain why comments keep disappearing so adding to the post:

If you want to assign a Power BI to that user it is:

New-MsolUser -UserPrincipalNameDIADUSER25@powercommunity.onmicrosoft.com -DisplayName DIADUSER24 -FirstName DIADUSER24 -LastName DIADUSER24 -Password  somePassword  -PasswordNeverExpires $true -AlternateEmailAddresse
s chass@microsoft.com -Country ‘United States’ -LicenseAssignment powercommunity:POWER_BI_STANDARD -UsageLocation US