Hi there, when using the mgmt create user API (`PO...
# ask-a-descoper
g
Hi there, when using the mgmt create user API (
POST https://api.descope.com/v1/mgmt/user/create
) with an existing login id it returns the existing user instead of upserting or returning an error Is it expected or am I doing something wrong?
example
r
Hi @Gadi Gomez We are looking into it
g
thanks 🙂
d
@Gadi Gomez yes it is expected, since the API is used for invite as well, so second time the invitation is sent.
There is a dedicated API for update/patch.
g
Not sure I follow, The API is for creating a new user, when I try to create a new user and the login id already exists I would expect it to return an error because the login id should be unique.. not to return a different already existing user @Doron Sharon
?
a
While creating a user, from the Descope perspective, since we also support b2b use cases, it might be that you create an existing user in a new tenant So we are not failing the request, but rather updating specific attributes of the user You can open a FR to expose a new API, and we will see how to handle this
g
The thing is that the attributes I set in the request did not update in the user that got returned, so there's something wrong here either way..
a
As I wrote above We dont set attributes, we handle roles & tenants
g
😕
a
@Gadi Gomez As I wrote above Please open a FR for this, so we can see how we can further push this
g
image.png