dateType IdentityProfile attribute issue

Hi everybody,

Our requirement :

We are getting 2 different dates from a source (Last logon from AD)
We want to compare it to take the most recent one and set it in a dedicated third custom Identity Attribute called “Last Login”

This part is working fine, but we have encountered a “side effect” which is we can’t do any date-type queries on this field in the “Search” module (e.g. attributes.lastLogin:<2022-01-01 returns all the Last Login dates)

In the documentation it is said that we need to add a dateType attribute to the end of our attribute name, which seems a bit odd …

  1. Is this the only solution to achieve this ? Can’t we set an attribute type in another way ?
  2. If yes, would it be possible to add the “dateType” to the technical Name of the attribute only (not the Display Name) ?

Hi @ARDS1,

Currently this is the only way to setup the attribute. only “endDate”, “startDate”, and fields named with suffix dateType, DateType or datetype will be indexed as a date and be searchable using range.
You need to add dateType anywhere in the name or at the end. Search uses technical name of attribute & hence adding it into technical name will work fine.

Hi Anamica,
I understand that adding dateType to the name of the attribute it will work, like you say it here.

But is it possible to have the “dateType” part of the attribute name appear only in the technical name but not in the label ?

Like in this example I faked the screenshot to illustrate my question.

lastLoginDateType

If it is possible, how to do this ?

Thanks,
Adriano

Hi @ARDS1 ,

Yes, you can use below API to update the technical name of the identity attribute. You will have to update the identity profile after doing this. Also the dateType indexing takes time & it will take some time to start showing up in search.

API
POST /cc/api/identityAttribute/update?name=
where = .api.identitynow.com
name= = current technical name of the identity attribute

Json Body: Replace name with the new technical name

{
  "displayName": "MyCustomAttr",
  "name": "mycustomattr",
  "searchable": true,
  "sources": [{
      "properties": {
        "ruleName": "Cloud Promote Identity Attribute",
        "ruleType": "IdentityAttribute"
      },
      "type": "rule"
    }
  ],
  "type": "string"
}

To get the identity attribute list:
GET /cc/api/identityAttribute/list
To get a particular identity attribute :
GET /cc/api/identityAttribute/get?name=

Regards,
Anamica

Hello

This solution worked for us.

Thanks Anamica.

Adriano

I have similar requirements, I need to calculate identity end date , which is going to be the farthest value out of {(attribute1, source1),{attribute 3, source 2),{attribute 3, source3)}.

example:

attribute1: 2022-05-10
attribute2: 2022-05-11
attribute3: 2022-05-12

output: 2022-05-12

could you please help me how to write complex rule or transform for this. thanks in advance

Hi Vijay,

This is a solved topic. Can you please open a new topic with your request? You can provide a link back to this topic to provide more context.

thanks @colin_mckibben , have created new one