Hi @Eric Gagnon , thanks for the question. I would recommend looking over the "Plan and Design" documents for user creation, specifically this one.
To begin, the "User Name" input should not be an email. For example: "cacaoutte". This is the unique identifier for a user. There can only be one "cacaoutte" for your domain. This is what's different from the "Name" field. A name could be the same for multiple users. There could be multiple "John Smith" for example, as long as their User Name is different.
The error you're getting when you edit your User Principal Name is because you need to add the domain to the end of it. If you change it to "cacaoutte@<YOURDOMAIN>.onmicrosoft.com" it will work. Basically, User Principal Domain is the username + your domain.
You can use whatever you like the most for user edit, as both follow the same rules. If you encounter any errors you can always post back here! Graph API is great for scripting and bulk changes if needed.
Please let me know if you have any questions and I can help you further!
If this answer helped you please mark it as "Verified" so other users can reference it.
Thank you,
James