When activating a Microsoft 365 account for a user and assigning licenses in the same action, you may encounter the following error: License assignment cannot be done for user with invalid usage location.
This appears to be caused by recent changes on the Microsoft side that may have introduced propagation delays for the usageLocation property value.
We are currently investigating the exact cause and working on a permanent fix. As a workaround, you can split the operation into three actions: first activate the account and set the usage location, then add a 1-minute delay using a PowerShell script, and finally assign the licenses.