0

I just want to use SCIM 2.0 REST APIs that per this guide are out of the box from 5.4.0 version of WSO2IS. I'm using WSO2 IS 5.7.

When I GET /scim2/Me with admin user (HTTP basic authentication), I get a 200 OK response, but when I try to call this API with a different user, I get the following HTTP response:

{
    "schemas": "urn:ietf:params:scim:api:messages:2.0:Error",
    "scimType": "invalidValue",
    "detail": "Required attribute id is missing in the SCIM Object.",
    "status": "400"
}

What's the problem here? Maybe I miss some basics on WSO2IS SCIM APIs usage?

Community
  • 1
  • 1
vortex.alex
  • 1,105
  • 3
  • 11
  • 24

1 Answers1

0

As per the error message, your user doesn't have a SCIM id. Log in to the management console and navigate Claims -> List -> wso2.org/claims and select User ID claim. Check Supported by Default by clicking the edit button of that claim and save. Then, navigate to Users and Roles -> List and see the user's profile and check whether the scim id is empty / not.

If the SCIM id is empty the above error would be expected.

There is a config (SCIMEnabled) to enable SCIM for the user store (https://docs.wso2.com/display/IS570/Configuring+a+Read-write+LDAP+User+Store). Navigate to <IS-HOME>/repository/conf/user-mgt.xml and check whether SCIMEnabled is set to true in your userstore.

Anuradha Karunarathna
  • 2,717
  • 2
  • 9
  • 17
  • I had already set the `SCIMEnabled` to `true` before facing this issue, because I wasn't able to call the SCIM APIs at all. Now I followed your instructions and I can see User ID is empty for that user, but I checked other users and many of them have it. I wonder why it is empty for that specific user, shouldn't User ID be populated automatically? – vortex.alex May 21 '21 at 08:49
  • It should be populated automatically if you create the user via a SCIM POST call. Maybe this user added before you enabling the SCIMEnabled property. I'm not sure whether SCIM id gets added if you add the user via the management console. – Anuradha Karunarathna May 21 '21 at 09:57