Why do I get mutability error in WSO2 IS 6.0.0 when trying to update userName using scim2 PATCH/PUT apis?

113 Views Asked by At

When I try to update userName in wso2 Identity server using scim2 PATCH/PUT apis passing User ID. I am getting the below error . { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" ], "scimType": "mutability", "detail": "Attribute userName cannot be modified.", "status": "400" }

Tried to update emails and userName using scim2 api Example:https://localhost:9443/scim2/Users/c8c821ba-1200-495e-a775-79b260e717bd

1

There are 1 best solutions below

0
Thumilan On

In WSO2 Identity Server (IS) 6.0.0, the "userName" attribute is not intended to be changed once it is set for a user. The "userName" typically serves as a unique identifier for a user account and is not meant to be modified.

If you need to update user information, you can consider modifying other attributes such as "givenName," "familyName," or "email," depending on your specific requirements.

If you need to change username, you can create a new user with the desired "userName" and migrate the relevant user data and attributes from the old user to the new user.