I've been using this code for more than 2 months.
And just got error 2 today ago.
So I use this code :
Import-CSV –Path C:\Office\4.csv |ForEach-Object { New-MsolUser -UserPrincipalName $_.username -DisplayName $_.displayname –Password $_.Password -UsageLocation $_.Location -LicenseAssignment $_. license -ForceChangePassword $false }
At first you can but over time it will fail, the message appears:
New-MsolUser : You have exceeded the maximum number of allowable transactions. Please try again later.
At line:1 char:52
+ ... ch-Object { New-MsolUser -UserPrincipalName $_.username -DisplayName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
+ FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.ThrottlingException,Microsoft.Online.Administration.Automation.NewUser
After he made an error, he can do it again later.
The problem is why You have exceeded the maximum number of allowable transactions. ??
What went wrong so : New-MsolUser : You have exceeded the maximum number of allowable transactions. Please try again later.
I'm very sure this is the office, because I use 2 different admins there are still errors.
As I have attached, for example when I created 12k users, only 10k succeeded, 2k failed.
Please help me
I'm pretty sure the problem is not with the code, but with Microsoft.