0
votes

I am trying to create a new user for an application which uses CosmosDB. From the documentation, it expose a service method to create a new user.

I believe the created user can access the Cosmos DB provided the users are updated with certain permission to the collections

And my query,

  1. Is there a service method to create a user with password? If not, any alternatives to do the same?
  2. Is there a way to see the created users in Data Explorer rather than List Users?
1

1 Answers

1
votes

1.Is there a service method to create a user with password? If not, any alternatives to do the same?

As I know, no such method in cosmos db. Based on this document, Azure Cosmos DB uses two types of keys to authenticate users and provide access to its data and resources. User and permission is resource token type here. It's meant to avoid the risk of master key exposure. It is authenticated by token,can't be password.

If do want to use password for authentication, maybe you just have to protect the token by password with your own logical code. Other words, you get the above resource token first then manage the mapping relationships between user and resource token by yourself.

2.Is there a way to see the created users in Data Explorer rather than List Users?

It can't be found on the portal now.You need to list users and permissions using sdk or rest api. You could commit feedback here to ask azure cosmos team to add this feature.