By: Ernst Arnold user 20 Nov 2016 at 9:48 p.m. CST

3 Responses
Ernst Arnold gravatar
Hi, I try to create a user with SCIM 2 on Gluu Identity Appliance 2.4.4.sp1 in SCIM test mode ``` POST https://<FQDN>/identity/seam/resource/restv1/scim/v2/Users?access_token=ffc1f<hidden>af6a body: {"userName":"TestUn1","givenName":"TestGn1","familyName":"TestFn1","displayName": "TestDn1"} response: {"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"status":"500","scimType":"","detail":null} ``` wrapper.log: ``` INFO | jvm 1 | 2016/11/21 03:33:35 | 2016-11-21 03:33:35,396 INFO [gluu.oxtrust.ws.rs.scim2.UserWebService] ##### SCIM Test Mode is ACTIVE INFO | jvm 1 | 2016/11/21 03:33:35 | 2016-11-21 03:33:35,464 INFO [gluu.oxtrust.ws.rs.scim2.UserWebService] (BaseScimWebService) validateToken token = ffc1f43c-6f52-4a26-8df6-aa362eecaf6a INFO | jvm 1 | 2016/11/21 03:33:35 | 2016-11-21 03:33:35,464 INFO [gluu.oxtrust.ws.rs.scim2.UserWebService] (BaseScimWebService) validateToken status = 200 INFO | jvm 1 | 2016/11/21 03:33:35 | 2016-11-21 03:33:35,464 INFO [gluu.oxtrust.ws.rs.scim2.UserWebService] (BaseScimWebService) validateToken entity = {"valid":true,"expires_in":29707639} INFO | jvm 1 | 2016/11/21 03:33:35 | 2016-11-21 03:33:35,464 INFO [gluu.oxtrust.ws.rs.scim2.UserWebService] (BaseScimWebService) validateToken isValid = true INFO | jvm 1 | 2016/11/21 03:33:35 | 2016-11-21 03:33:35,464 INFO [gluu.oxtrust.ws.rs.scim2.UserWebService] (BaseScimWebService) validateToken expires = 29707639 INFO | jvm 1 | 2016/11/21 03:33:35 | 2016-11-21 03:33:35,465 ERROR [gluu.oxtrust.ws.rs.scim2.UserWebService] Failed to create user INFO | jvm 1 | 2016/11/21 03:33:35 | java.lang.NullPointerException INFO | jvm 1 | 2016/11/21 03:33:35 | at org.gluu.oxtrust.util.CopyUtils2.isValidData(CopyUtils2.java:1044) INFO | jvm 1 | 2016/11/21 03:33:35 | at org.gluu.oxtrust.util.CopyUtils2.copy(CopyUtils2.java:125) INFO | jvm 1 | 2016/11/21 03:33:35 | at org.gluu.oxtrust.service.scim2.Scim2UserService.createUser(Scim2UserService.java:50) ``` A filter request with the same token works fine. Thanks for any help

By Ernst Arnold user 20 Nov 2016 at 10:14 p.m. CST

Ernst Arnold gravatar
Hi, Worked it out although I do not know where to look for the proper documentation: ``` POST /identity/seam/resource/restv1/scim/v2/Users?access_token=ffc1f...eecaf6a HTTP/1.1 Host: Accept: application/scim+json Content-Type: application/json Cache-Control: no-cache { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName": "TestUn1", "name": { "formatted": "TestUn1 User", "familyName": "User", "givenName": "TestUn1", "middleName": null, "honorificPrefix": null, "honorificSuffix": null }, "displayName": "Test1 ", "nickName": null, "profileUrl": null, "title": null, "userType": null, "preferredLanguage": null, "locale": null, "timezone": null, "active": null, "password": "abc123", "emails": [], "phoneNumbers": [], "ims": [], "photos": [], "addresses": [], "groups": [], "entitlements": [], "roles": [], "x509Certificates": [] } ```

By Ernst Arnold user 20 Nov 2016 at 10:43 p.m. CST

Ernst Arnold gravatar
See https://tools.ietf.org/html/rfc7643#section-8.2

By Valentino Pecaoco user 21 Nov 2016 at 1:27 a.m. CST

Valentino Pecaoco gravatar
Hi Ernest, If you don't include `urn:ietf:params:scim:schemas:core:2.0:User` as mandated by the spec the User object will not be deserialized hence it will be null.