Thank you again.
Sorry to bring the old issue up again, but initially when I setup the script it was working to change the domain to a different one in O365. But now it seems to not work during the creation phase, I have to run it after and it works fine. It's the "Update O365 Username to <domain> for the user"
My guess is that the account isn't fully created/"ready" to be used, and the business rules are going to quickly. Is there anyway to put logic in to say ok is the ready flag yes?, then proceed. If not, wait until flag says yes and then go.
Is that possible?