By: Nagarajan Viswanathan user 18 Aug 2015 at 5:37 a.m. CDT

16 Responses
Nagarajan Viswanathan gravatar
Hi, I would like to use dynamic/custom attributes with SCIM endpoints while creating a person. So I want to add this new attribute to the gluu system and use it in SCIM API calls. So I followed the tutorial at http://www.gluu.org/docs/reference/lib/scim/ and http://www.gluu.org/docs/admin-guide/configuration/#organization-configuration When I create attributes using "add attributes" option in oxtrust UI, the system never shows this newly added attribute. I have tried both active and inactive attributes. Could you please correct this or point me to a right way of adding custom attribute to the gluu server so that I can use it with SCIM. Thanks Naga

By Mohib Zico Account Admin 18 Aug 2015 at 5:52 a.m. CDT

Mohib Zico gravatar
Naga, Can you send us some steps to reproduce it? May be you can record a screencast and send that link to us? In any case, I would check for oxtrust.log and oxauth.log for any kind of stack trace related to this error.

By Nagarajan Viswanathan user 19 Aug 2015 at 4:25 a.m. CDT

Nagarajan Viswanathan gravatar
Dear Mohib, thanks for the response. I have found out why it was not displaying in the list of attributes when I add, it was because I had set the Edit type and View type as user, but logged in as admin. Now I have set these types to both admin and user and I can see the new custom attributes added in the UI. BUT, I cannot add custom attributes by sending this attribute as part of the json when creating a new user using the SCIM client. The request format is as below: {"schemas":......(as provided and works without custome attribute) at the end i have "customAttributes":[{"name":"CompanyName","values":["some random value1","some random value2"]}] as suggested at http://www.gluu.org/docs/reference/lib/scim/ The response i get while adding the customattributes at the end is { "errors": [ { "description": "Unexpected processing error, please check the input parameters", "code": 500, "uri": "" } ] } Please let me know if I am sending the request in the correct format for custom attributes ( without it, the request works and creates new Person/User) Thanks Naga

By Nagarajan Viswanathan user 19 Aug 2015 at 6:06 a.m. CDT

Nagarajan Viswanathan gravatar
Hi, Just to update. The Other SCIM method updatePersonString works with customAttribute, Looks like just createPersonString does not work when customAttributes are passed. Regards Naga

By Nagarajan Viswanathan user 20 Aug 2015 at 4:49 a.m. CDT

Nagarajan Viswanathan gravatar
Hi, Can someone look into this please? The problem is as follows: 1) while trying to create a person using the SCIM client library using client.createPersonString, the method does not create a person with custom attributes. But when i update a person with custom attributes it works. So there is something wrong when we use createPersonString scim api method along with custom attributes. Please correct this. 2) Even when a person is created, it is not active though the active variable is created with value true. So when I try to do further operations on the person with userid (inum), the scim cannot find the person as it is not active. But once i update the person using oxtrust UI, this sets the active variable to true and then on I am able to do further operations on this person using scim api. I think the error is with setting the active variable to true when createPersonString method is called. Thanks Naga

By Mohib Zico Account Admin 20 Aug 2015 at 5:01 a.m. CDT

Mohib Zico gravatar
We will look into it and share our results in ticket. Stay tuned, Zico

By Nagarajan Viswanathan user 20 Aug 2015 at 5:22 a.m. CDT

Nagarajan Viswanathan gravatar
More details regarding the problem 1) json used to create a person which results in not creating a person.If I remove the value of customAttribute variable(i.e. "customAttributes": []) then person is created successfully { "schemas": [ "urn:scim:schemas:core:1.0" ], "id": "@!D815.81A4.5EA2.0FC2!0001!0799.C4C5!0000!5CCC.61EA", "externalId": "scimjohn ", "userName": "john ", "name": { "givenName": "John", "familyName": "Smith", "middleName": "N/A", "honorificPrefix": "N/A", "honorificSuffix": "N/A" }, "displayName": "John Smith", "nickName": "Sensei", "profileUrl": "http://www.gluu.org/", "emails": [ { "value": "john @gluu.org", "type": "work", "primary": "true" }, { "value": "john 2@gluu.org", "type": "home", "primary": "false" } ], "addresses": [ { "type": "work", "streetAddress": "621 East 6th Street Suite 200", "locality": "Austin", "region": "TX", "postalCode": "78701", "country": "US", "formatted": "621 East 6th Street Suite 200 Austin , TX 78701 US", "primary": "true" } ], "phoneNumbers": [ { "value": "646-234-5678", "type": "work" } ], "ims": [ { "value": "nynyjohn ", "type": "Skype" } ], "photos": [ { "value": "http://www.gluu.org/wp-content/themes/SaaS-II/images/logo.png", "type": "gluu photo" } ], "userType": "CEO", "title": "CEO", "preferredLanguage": "en-us", "locale": "en_US", "timezone": "America/Chicago", "active": "true", "password": "Hidden for Privacy Reasons", "groups": [], "roles": [], "entitlements": [], "x509Certificates": [], "meta": { "created": "", "lastModified": "", "version": "", "location": "" }, "customAttributes": [{"name":"CompanyName","values":["some nonsense company"]}] }

By Nagarajan Viswanathan user 27 Aug 2015 at 8:25 a.m. CDT

Nagarajan Viswanathan gravatar
Hi, Is someone looking into this? If it is going to take a long time please let me know so that I can take corresponding action. Thanks Naga

By Mohib Zico Account Admin 27 Aug 2015 at 8:52 a.m. CDT

Mohib Zico gravatar
Hello Naga, It's in our list. Community Tickets has no ETA so can't give you any timeframe, sorry. Regards, Zico

By Mohib Zico Account Admin 01 Oct 2015 at 11:22 a.m. CDT

Mohib Zico gravatar
Hi Vincent, Which Gluu Server version you are using? [Here](https://support.gluu.org/view/other/gluu-server-version/1754) is how you can check your version.

By Mohib Zico Account Admin 01 Oct 2015 at 11:43 a.m. CDT

Mohib Zico gravatar
Let's try with 2.3.4.

By Yuriy Movchan staff 01 Oct 2015 at 2:43 p.m. CDT

Yuriy Movchan gravatar
I've fixed bug which led to issue with custom attributes. Can you replace identity.war with `http://ox.gluu.org/maven/org/xdi/oxtrust-server/2.3.4.Final/oxtrust-server-2.3.4.Final.war` I've committed bugfix to 2.3.4 version and master.

By Yuriy Movchan staff 02 Oct 2015 at 2:12 a.m. CDT

Yuriy Movchan gravatar
I tried to add user using JSON from your previous message. I only replaced: "customAttributes": [{"name":"CompanyName","values":["some nonsense company"]}] with "customAttributes": [{"name":"CompanyName","values":["some nonsense company"]}, {"name":"gluuStatus","values":["active"]}] to allow user log in after creation. Here is result: dn: inum=@!6C2B.6E21.40DD.524A!0001!758E.0789!0000!F71E.DCDE,ou=people,o=@!6 C2B.6E21.40DD.524A!0001!758E.0789,o=gluu objectClass: gluuPerson objectClass: ox-6C2B6E2140DD524A0001758E0789 objectClass: top cn: John Smith displayName: John Smith givenName: John gluuStatus: active iname: null_person_john2 inum: @!6C2B.6E21.40DD.524A!0001!758E.0789!0000!F71E.DCDE locale: en_US middleName: N/A nickname: Sensei oxTrustActive: true oxTrustAddresses: [{"type":"work","streetAddress":"621 East 6th Street Suite 200","locality":"Austin","region":"TX","postalCode":"78701","country":"US" ,"formatted":"621 East 6th Street Suite 200 Austin , TX 78701 US","primary" :"true"}] oxTrustEmail: [{"value":"john @gluu.org","type":"work","primary":"true"},{"v alue":"john 2@gluu.org","type":"home","primary":"false"}] oxTrustExternalId:: c2NpbWpvaG4g oxTrusthonorificPrefix: N/A oxTrusthonorificSuffix: N/A oxTrustImsValue: [{"value":"nynyjohn ","type":"Skype"}] oxTrustPhoneValue: [{"value":"646-234-5678","type":"work"}] oxTrustPhotos: [{"value":"http://www.gluu.org/wp-content/themes/SaaS-II/imag es/logo.png","type":"gluu photo"}] oxTrustProfileURL: http://www.gluu.org/ oxTrustTitle: CEO oxTrustUserType: CEO preferredLanguage: en-us sn: Smith uid: john2 userPassword:: e1NTSEF9OTlQeTNSb2NOSTR5U2hPczErMW5SL1V4UmNpeUwyWXA4MExLWFE9P Q== zoneinfo: America/Chicago CompanyName: some nonsense company

By Yuriy Movchan staff 02 Oct 2015 at 2:15 a.m. CDT

Yuriy Movchan gravatar
In this entry there are both required attributes: CompanyName: some nonsense company gluuStatus: active