Is there a maximum value for the Integer type of extension attributes?

153368
New Contributor

Hello Jamf Community,

  1. Is there a maximum value for the Integer type of extension attributes?
  2. If it exists, what is the maximum value?
  3. What happens if you set a value that exceeds the maximum value?
  4. Where can I find information about the maximum value?
1 REPLY 1

TrentO
Contributor II

Interesting question! While I don't have an actual answer, I can tell you that the value of all extension attributes (regardless of data type) are stored in the database as a LONGTEXT value. This means by default it can hold up to 4,294,967,295 characters (so an effective int value of 9x10^4,294,967,295). That said this does not account for whichever parsing library Jamf Pro uses to convert the value to and from a string, nor does it account for the variable type the client and server use to hold the value while running. I would expect the actual value to be much smaller. More than likely the value is 2^31-1 as that's the default Java Integer maximum, and it seems silly to use a BigInteger in this case. I can't think of a way to confirm this without trying to store values until I get an error.

All that said, I have yet to run into the maximum while working with Jamf.