jelhub / scimgateway

Using SCIM protocol as a gateway for user provisioning to other endpoints
MIT License
176 stars 57 forks source link

When users do not have other emails on their entra ID, the fix #118 does not work. #121

Closed inchandru closed 5 months ago

inchandru commented 5 months ago

Hai Guys,

I have 2 users in Entra ID, One with otherMails and another user without otherMails. When I use fix #118, it works if the user has otherMails. However, if otherMails is empty, scimgateway does not handle the null value, it throws Protocol Error.

The solution suggested in #118

Expression = Join(",", Split([otherMails], ","))

"map": { "user": { "mailAlternateAddress": { "mapTo": "emails.other.value", "type": "array", "typeInbound": "string" },

Debug logs:

image

Thank you 🙂

jelhub commented 5 months ago

In #118 you should use:

  "user": {
    "mailacceptinggeneralid": {
      "mapTo": "locale",
      "type": "array",
      "typeInbound": "string"
    }

And Entra ID provisioning configuration:

Expression = Join(",", Split([otherMails], ","))
Target attribute = locale (or some other existing attribute, do not set multi-value)

You should not use emails.other.value like your mapTo defintion indicates. Target must be an existing single value attribute in entra (not emails)

If mailAlternateAddress now are the new ldap multivalue attribute, then you replace mapping configuration mailacceptinggeneralid with mailAlternateAddress

inchandru commented 5 months ago

Hi @jelhub ,

When I mapped otherMails attribute to locale variable it's working. Thanks