SOLVED

Max number of bulk user attributes change per script

%3CLINGO-SUB%20id%3D%22lingo-sub-2319877%22%20slang%3D%22en-US%22%3EMax%20number%20of%20bulk%20user%20attributes%20change%20per%20script%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2319877%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHi%2C%20I%20want%20to%20ask.%20If%20I%20want%20to%20bulk%20change%20user%20attributes%20with%20powershell%20azureAD%20by%20importing%20a%20Csv%20file%2C%20what%20is%20the%20max%20number%20of%20user%20attributes%20that%20can%20be%20changed%20with%20a%20single%20script%20from%20a%20single%20csv%20file%3F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EIs%20there%20a%20limit%20to%20the%20max%20users%20in%20a%20single%20csv%20file%20that%20can%20be%20processed%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EHere%20is%20what%20I%20am%20planning%20to%20do%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E1.%20First%20script.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EImport-CSV%20%22C%3A%5CUserAttributes.csv%22%20%7C%20Foreach%20%7B%20Set-AzureADUser%20-ObjectID%20%24_.UserPrincipalName%20-Department%20%24_.Department%20-JobTitle%20%24_.Title%20-Surname%20%24_.LastName%20-GivenName%20%24_.FirstName%20-DisplayName%20%24_.DisplayName%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWith%20this%20script%20I%20want%20to%20change%20the%20users'%20department%2C%20job%20title%2C%20firstname%2C%20lastname%20and%20displayname.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E2.%20Second%20script%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EImport-CSV%20%22C%3A%5CUserAttributes.csv%22%20%7C%20ForEach-Object%20%7B%3CBR%20%2F%3E%24CPW%20%3D%20%24_.Password%3CBR%20%2F%3E%24CPWS%20%3D%20ConvertTo-SecureString%20-String%20%24CPW%20-AsPlainText%20-Force%3CBR%20%2F%3ESet-AzureADUserPassword%20-ObjectId%20%24_.UserPrincipalName%20-Password%20%24CPWS%20-EnforceChangePasswordPolicy%3A%24false%20%7D%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWith%20this%20script%20I%20want%20to%20re-assign%20new%20password%20to%20users.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E3.%20Thrid%20script%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EImport-CSV%20%22C%3A%5CUserAttributes.csv%22%20%7C%20Foreach%20%7B%20Set-AzureADUser%20-ObjectID%20%24_.UserPrincipalName%20-UserPrincipalName%20%24_.UPN%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWith%20this%20script%20I%20want%20to%20change%20the%20users'%20email.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%203%20scripts%20above%20are%20tested%20and%20run%20perfectly%20with%2010%20test%20users%20that%20I%20created.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ESo%2C%20back%20to%20my%20question.%20Is%20there%20any%20limit%20to%20the%20max%20number%20of%20users%20in%20one%20csv%20file%20that%20can%20be%20processed%20with%20every%20single%20script%20above%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EJust%20to%20let%20you%20know%2C%20there%20are%20620s%20users%20in%20my%20department%20and%20around%207000%20users%20in%20the%20whole%20organisation.%20If%20I%20can%20do%20it%20at%20once%20with%20a%20single%20csv%20file%20that%20will%20be%20very%20convenient.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2319877%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzureAD%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUser%20Attributes%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2324971%22%20slang%3D%22en-US%22%3ERe%3A%20Max%20number%20of%20bulk%20user%20attributes%20change%20per%20script%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2324971%22%20slang%3D%22en-US%22%3EThere%20isnt%2C%20but%20you%20might%20run%20into%20some%20throttling%20issues%20and%20such.%20Best%20add%20some%20delay%20in%20between%20cmdlet%20execution.%3C%2FLINGO-BODY%3E
Contributor

Hi, I want to ask. If I want to bulk change user attributes with powershell azureAD by importing a Csv file, what is the max number of user attributes that can be changed with a single script from a single csv file?
Is there a limit to the max users in a single csv file that can be processed?

 

Here is what I am planning to do:

1. First script.

Import-CSV "C:\UserAttributes.csv" | Foreach { Set-AzureADUser -ObjectID $_.UserPrincipalName -Department $_.Department -JobTitle $_.Title -Surname $_.LastName -GivenName $_.FirstName -DisplayName $_.DisplayName }

With this script I want to change the users' department, job title, firstname, lastname and displayname.

 

2. Second script

Import-CSV "C:\UserAttributes.csv" | ForEach-Object {
$CPW = $_.Password
$CPWS = ConvertTo-SecureString -String $CPW -AsPlainText -Force
Set-AzureADUserPassword -ObjectId $_.UserPrincipalName -Password $CPWS -EnforceChangePasswordPolicy:$false }

With this script I want to re-assign new password to users.

3. Thrid script

Import-CSV "C:\UserAttributes.csv" | Foreach { Set-AzureADUser -ObjectID $_.UserPrincipalName -UserPrincipalName $_.UPN }

With this script I want to change the users' email.

 

The 3 scripts above are tested and run perfectly with 10 test users that I created.

 

So, back to my question. Is there any limit to the max number of users in one csv file that can be processed with every single script above?

 

Just to let you know, there are 620s users in my department and around 7000 users in the whole organisation. If I can do it at once with a single csv file that will be very convenient.

 

Thank you

2 Replies
best response confirmed by RikkyCitra (Contributor)
Solution
There isnt, but you might run into some throttling issues and such. Best add some delay in between cmdlet execution.
Thank you for the reply. It's very comforting to know that there is no limit to the number of users. I will try to give several hours interval between script execution and do it per sub-department to change smaller number of users at once.

Best regards