Custom attribute string data type max length?

could you please help me understand the max length of custom attributes as per data type?

also, I would like to understand if we can store any Array of object data in the profile.

As far as I know, the maximum length of a string attribute has never been enforced. I know of a case where it was stuffed with 1MB of JSON data. However, Okta recommends that the total size of the user profile should not exceed 1MB.

As far as the other attributes go, numbers are stored as 64-bit doubles and integers are stored as 64-bit longs, per the documentation: Add custom attributes to an Okta user profile | Okta.

There is no mechanism for storing an array of objects, but you could store JSON.

All of this being said, the Okta user profile is not meant to be a database of user information. There are only two reasons to put data in the user profile:

  1. It is used to help identify users and needs to be there for Okta expression language scripts to use it.
  2. It needs to be pushed across disparate applications during provisioning that have no links to each other, like a piece of data that needs to be distributed to both Salesforce and Microsoft 365.

This is why the common attributes are information that is likely to be needed in places like Salesforce or Microsoft 365. But it isn’t the place to store the last time the user bought an ice cream. There is an example in the API Access Management for OAuth class (Training) that implements a trick we have to create a list of permissions that are pushed to application in the ID token. In all the years I’ve been writing programs that interface with Okta and Auth0, that’s the only scenario where I ever used an array.

If related applications need to share information, they should use their own common database, not the user profile :slight_smile: