As you mentioned the only supported method right now to create or manage secondary users in MongoDB vCore is through the Azure Portal UI.
Recommendation for your case:
Go to your vCore cluster in the Azure Portal
Navigate to Security > Users
Add the secondary user from there with the appropriate roles
CLI-based user creation (including az cosmosdb mongodb user definition create) applies only to Cosmos DB for MongoDB API (NoSQL with API emulation), not to the newer vCore-based deployments.
MongoShell (db.createUser()) is not supported in vCore as you've seen — user management is abstracted and restricted for security and consistency.
az cosmosdb mongocluster user create is intended for Cosmos DB for MongoDB vCore, but this subcommand is not yet available in GA (General Availability) in the public CLI — even with the cosmosdb-preview extension.
As of now (August 2025), the only officially supported and stable method to create secondary MongoDB users in Cosmos DB vCore is through the Azure Portal UI:
Navigate to Azure Cosmos DB for MongoDB vCore account
Go to "Security" → "Users"
Click "Add user" and input:
Username
Password
Database
Roles (readWrite, read, etc.)
⚠️ If this UI flow is missing or failing in your portal instance:
Double-check you're targeting a vCore MongoDB cluster, not a NoSQL account.
Ensure you're in a supported region (some preview features are region-specific).
Confirm the Azure role assignment has sufficient privileges (e.g., Owner or Cosmos DB Account Contributor).
😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!