SOLVED

Updating User expiration dates using API

Go to solution
anne_sample_f5
Level 4

I'm using the "update users API" to change the expiration date for a batch of users.

 

I am getting a response when I send the post, and it is actually changing the users. But instead of changing to the date I have set in the request, it's changing to "null/never." I've looked at the documentation surrounding the date format (although it's somewhat limited) and I even tried setting one user to the date I wanted, then copying the value from a "get user" response and pasting it into my body, but the same thing keeps happening.

 

I'm sure I'm missing something obvious, anyone have any ideas?

 

Here is my post body:

{

"action": "createOrUpdate",

"input": [

{

"expiresAt": "2023-12-31T06:00:00.000t+0000"

}

]

}
1 ACCEPTED SOLUTION
DavidK
Level 2

If anyone is trying to update users, not leads the format for /management/v1/users/{userid}/update.json is 

yyyyMMdd'T'HH:mm:ss.SSS't'Z

Example: 20241118T14:29:56.222t+0000
Note that the time-zone does not contain the colon and Z is not accepted (which is really weird). 

DavidK_0-1731940211192.png

View solution in original post

13 REPLIES 13