Bulk Update User Info in Azure Active Directory

%3CLINGO-SUB%20id%3D%22lingo-sub-1224654%22%20slang%3D%22en-US%22%3EBulk%20Update%20User%20Info%20in%20Azure%20Active%20Directory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1224654%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Community%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20a%20small%20requirement%20of%20which%20I%20have%20to%20bulk%20change%20the%20User%20Principal%20Name%20and%20I%20have%20found%20few%20ways%20to%20achieve%20the%20same%3A%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20website%20given%20below%20outlines%20the%20way%20this%20can%20be%20achieved.%20But%20the%20problem%20with%20this%20site%2C%20is%20that%20I%20am%20unable%20to%20understand%20which%20software%20tools%20the%20author%20has%20used%20to%20achieve%20this%2C%20and%20also%20there%20is%20some%20code%20snippet%20attached%20and%20couldn't%20understand%20where%20to%20copy%20and%20paste%20that%20code%20in%20the%20software%20that%20he%20used%20earlier.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.macaalay.com%2F2016%2F08%2F12%2Fchanging-user-principal-names-in-bulk-on-azure-active-directory%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.macaalay.com%2F2016%2F08%2F12%2Fchanging-user-principal-names-in-bulk-on-azure-active-directory%2F%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20for%20someone%20having%20idea%20with%20Microsoft%20products%2C%20can%20you%20please%20me%20out%20in%20describing%20the%20software%20used%20and%20where%20can%20I%20execute%20the%20provided%20code%20on%20the%20software.%20So%20that%20it%20can%20help%20me%20achieve%20the%20required%20objective.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1224675%22%20slang%3D%22en-US%22%3ERe%3A%20Bulk%20Update%20User%20Info%20in%20Azure%20Active%20Directory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1224675%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3Etry%20the%20Azure%20Active%20Directory's%20specific%20community%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-active-directory%2Fct-p%2FAzureActiveDirectory%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-active-directory%2Fct-p%2FAzureActiveDirectory%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3Ebtw%2C%20I%20think%20what%20is%20shown%20in%20that%20blog%20post%2C%20is%20actually%20the%20same%20Azure%20Active%20Directory%20website%20that%20exists%20on%20Microsoft%20servers%20but%20in%20the%20older%20design%2C%20since%20that%20blog%20post%20is%204%20years%20old%20(2016).%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi Community,

I have a small requirement of which I have to bulk change the User Principal Name and I have found few ways to achieve the same:

The website given below outlines the way this can be achieved. But the problem with this site, is that I am unable to understand which software tools the author has used to achieve this, and also there is some code snippet attached and couldn't understand where to copy and paste that code in the software that he used earlier.

http://www.macaalay.com/2016/08/12/changing-user-principal-names-in-bulk-on-azure-active-directory/

So for someone having idea with Microsoft products, can you please me out in describing the software used and where can I execute the provided code on the software. So that it can help me achieve the required objective.

3 Replies
Highlighted
Hi,
try the Azure Active Directory's specific community:
https://techcommunity.microsoft.com/t5/azure-active-directory/ct-p/AzureActiveDirectory

btw, I think what is shown in that blog post, is actually the same Azure Active Directory website that exists on Microsoft servers but in the older design, since that blog post is 4 years old (2016).

Thanks @HotCakeX

 

@KNDheerajHello! You've posted your question in the Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Azure Active Directory space- please post AAD questions there in the future. 

 

Highlighted

@KNDheeraj if you don't really know what you are doing then this is somewhat dangerous. Running someone else's script without understanding it could cause you some serious issues that you cannot fix.

Also, even if this works do you understand the implications? The users must be aware and will need to sign in to applications using the new UPN. They may need to log out of some applications and back in again, and may need to tell the apps to forget the old ones.

 

I assume you have a global admin account?

 

That being said this is how you can do it. On Windows, search for 'powershell ISE'. Don't left click on the search result, but right click and choose 'run as administrator'.

When it opens, there should be 2 halves, a white one and a blue one. If not find the button at the top that says 'show script pane' and click in those until you have white at the top and blue at the bottom.

Then paste this into the white area:

Install-Module MSOnline

Hit the play button in the toolbar. This should install after a while, click Yes to all to any warnings.

Now, paste that guys script into the white area (replacing the bit above), modify the domains to suit and hit play again.

Finally, check that everyone's UPN has changed by typing get-msoluser in the bottom and then return.