Ebru Yener
Ebru Yener

Reputation: 674

How to configure Auth0 for Kayako SAML

Kayako has a SAML plugin that is maintained at: https://github.com/kayako/saml-sso-integration

It allows admin to configure SAML2 parameters: kayako saml parameters

It exactly needs a parameter name as "name" and "email". However, The name field should exist under user_metadata sub-structure in Auth0. Unfortunately, using "user_metada.name" for kayako name parameter is not accepted because kayako plugin can not parse incoming object.

There is a mapping in Auth0 panel. Following mapping does not work for me, I need user_metadata.name.

"mappings": { "user_id": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", "email": "email", "name": "name" },

How to map the name field in SAML2 response to user_metadata.name field?

Upvotes: 0

Views: 248

Answers (1)

Ebru Yener
Ebru Yener

Reputation: 674

We should add an Auth0 rule for this mapping. Create a rule and put the code below for this rule:

function (user, context, callback) {
  user.name = user.user_metadata.name;
  callback(null, user, context);
}

This sets the name field as user_metadata.name

also put the following mapping in Auth0 > client> addon> SAML2:

...
"mappings": {
    "user_id": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
    "email": "email",
    "name": "name",

  },
...

Upvotes: 0

Related Questions