Hi Anita,

derived schemas are considered as strings by Syncope, please consider not to use them. You could use:

1. A custom logic action [1] (assigned to the realm containing users)
   that assigns the value to the Syncope attribute "active" while
   creating/updating the user through console or via REST. This
   approach needs you to create a PLAIN schema of type *Boolean* named
   "active".
2. A custom propagation action [2]  that injects the Boolean value
   among the attributes sent to the external resource, without the need
   of mapping it to a Syncope attribute. Take this [3] as an example of
   what I'm referring to.

Moreover consider that the SCIM connector also supports status management, so you can use ConnID special attribute __ENABLE__ in your mapping (if choosing solution 1). E.g. "active" -> __ENABLED__

Best regards,
Andrea

[1] https://syncope.apache.org/docs/2.1/reference-guide.html#logicactions

[2] https://syncope.apache.org/docs/2.1/reference-guide.html#propagationactions

[3] https://github.com/apache/syncope/blob/syncope-2.1.5/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java#L105-L134

Il 08/11/19 21:51, [email protected] ha scritto:

Hello!

I am using SCIM 1.1 connector and I need to pass a Boolean value from a derived schema.

Here’s an example that works.

{

"schemas":["urn:scim:schemas:core:1.0"],

"userName":"[email protected]",

     "externalId":"bjensen",

     "name":{

       "formatted":"Ms. Barbara J Jensen III",

       "familyName":"Jensen",

       "givenName":"Barbara"

     },

     "emails": [

        {

            "value": "[email protected]",

            "type": "work",

"primary": true

        }

    ],

"active": true

}

Here’s the propagation detail from Syncope:

[ {

  "name" : "schemas",

  "value" : [ "urn:scim:schemas:core:1.0" ]

}, {

"name" : "active",

  "value" : [ "true" ]

}, {

  "name" : "name.givenName",

  "value" : [ "Queenie" ]

}, {

  "name" : "username",

  "value" : [ "[email protected]" ]

}, {

  "name" : "__NAME__",

  "value" : [ null ]

}, {

  "name" : "name.familyName",

  "value" : [ "Arias" ]

}, {

"name" : "emails.work.primary",

  "value" : [ "true" ]

}, {

  "name" : "externalId",

  "value" : [ "QBA3106" ]

}, {

  "name" : "emails.work.value",

  "value" : [ "[email protected]" ]

} ]

Here’s my error message:

Users failed to create: CREATE FAILURE (key/name): 415183bf-4946-4069-9183-bf4946006945/QBA3106 with message: While executing request: {"Errors":[{"description":"The new user must be created in \u0027active\u0027 status for user with userName [email protected]","code":"400"}]}

It appears that the values would be accepted if they didn’t have double quotes.

Here’s where the derived attributes are defined in schema

Any suggestions?

Thank you!

Lynn Finch

P: 615-236-3781 | M: 615-454-7925

--
Dott. Andrea Patricelli
Tel. +39 3204524292

Engineer @ Tirasa S.r.l.
Viale Vittoria Colonna 97 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Apache Syncope PMC Member

Reply via email to