Skip to main content
Solved

Update IAM user within procedure (API)

  • October 18, 2022
  • 4 replies
  • 109 views

We have a registration form (frontend) that performs an API call to our database. In the API procedure we check whether the entered data corresponds with the data in the database. Then we check if there is an existing IAM user. If no, we create a new IAM user, if yes, we want to update the existing IAM user. Checking the data in the IAM database and creating a new IAM user works fine. However when trying to  update a IAM user (the email address) we get a 422 error code. Should it be possible to update an IAM user E-mailadress? Or is there a setting or constraint that prevents it from working?

Best answer by Mark Jongeling

Hi, 

The message after decoding (link) is:

{"MessageType":"ApplicationDbMessage","MessageID":"not_authorized_usr_admin","RawMessage":"<msg id=\"not_authorized_usr_admin\"></msg>","NamedParameters":[],"TranslatedMessage":null}

Meaning that the API call is performed by someone who is not an authorized user administrator.

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

4 replies

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 653 replies
  • October 18, 2022

The TSFMessages header in the response might provide a hint on the underlying error.

Can you share this error message?


Respons headers »

tsfmessages:

eyJNZXNzYWdlVHlwZSI6IkFwcGxpY2F0aW9uRGJNZXNzYWdlIiwiTWVzc2FnZUlEIjoibm90X2F1dGhvcml6ZWRfdXNyX2FkbWluIiwiUmF3TWVzc2FnZSI6Ijxtc2cgaWQ9XCJub3RfYXV0aG9yaXplZF91c3JfYWRtaW5cIj48L21zZz4iLCJOYW1lZFBhcmFtZXRlcnMiOltdLCJUcmFuc2xhdGVkTWVzc2FnZSI6bnVsbH0=


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3945 replies
  • Answer
  • October 19, 2022

Hi, 

The message after decoding (link) is:

{"MessageType":"ApplicationDbMessage","MessageID":"not_authorized_usr_admin","RawMessage":"<msg id=\"not_authorized_usr_admin\"></msg>","NamedParameters":[],"TranslatedMessage":null}

Meaning that the API call is performed by someone who is not an authorized user administrator.


Thank you. With your help I found the cause of the error. The issue is indeed related to the authorisation of the user. In the Software Factory I have updated the role correctly. However the authorisation that is meant in de error message is the authorisation in the IAM. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings