Response mapping for entitlements/groups/roles in the Web service connector

Hi,
I’m having some trouble with getting the mapping correct for roles on an account in a web service connector. The other attributes are mapped correctly but for the roles I get the whole json row in the name.

In the response mapping I have set Schema attribute: roles and Attribute path: roles.role

The json looks like this:

"roles": [
        {
            "role": "Rolename 1"
        },
        {
            "role": "Rolename 2"
        },
       {
            "role": "Rolename 3"
        }
    ],

The result looks like this on the user account:
User 1

roles : 
 {"role": "Rolename 1"}
 {"role": "Rolename 3"}

How should I make the mapping to get only “Rolename 1” or “Rolename 3” in the name of the role?

In you schema for the web services connector do you have roles listed as a multi value attribute?

yes, it’s multivalue and labeled as entitlement

Try unselecting that and run again and see if you get the result you are looking for.

Hi @iamjenny ,

Can you try using roles[*].role, If this doesn’t work can you please share the sample full account json.

Thank you

for some reason the roles doesn’t map at all now. It’s just empty

I cleaned out all the accounts, changed to roles[].role and aggregated again. Now it works. I tried roles[].role earlier though without any results so it feels like there was some kind of a bug that didn’t update my changes correctly.
Thanks for the help @mpotti and @rkhade

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.