Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

When calling updateUser API to set a customproperty to null the word null is updated in Saviynt

RBKHC
New Contributor II
New Contributor II

When calling updateUser API to set a customproperty to null the word null is updated in Saviynt. Is this a bug or is there a different way to set as null?

Saviynt version: 2020.1.2

API Reference: Saviynt Security Manager API Reference v5.5SP5/v2020.1

Post: https://<yourserver>.saviyntcloud.com/ECM/api/updateUser

 

Body JSON:
{
"customproperty53": null,
"username": "xxxxxxxx"
}

Result

RBKHC_0-1654374579570.png

 

8 REPLIES 8

Rajesh-R
Saviynt Employee
Saviynt Employee

Greetings, 

To confirm to our question, Yes this is the expected behavior in Saviynt APIs and UI updates. Let me explain the sequence.

  1. When a new user is created, if we are not updating any value for customproperty53, the value will remain as null in Saviynt.
  2. When you update customproperty53 of the user, the value will change to the updated valued.
  3. Now when you want to clear the customproperty53 of the user, the value cannot go back to null, it can be updated back to Empty String.

 

{
"customproperty53": "",
"username": "xxxxxxxx"
}

 

  • When you try to update a value of customproeprty53 to null via API, It will try to set the string null in the customproperty53.
  • User Creation / Updation via UI also, the same behaviour holds, while creating if we are not populating some attributes, they remain as null. But if we flip it to some value and updating it back to empty, will make the value in the attribute as empty string and not null.
  • User Creation / Updation via Imports - supports null updates.

 


Thanks
Rajesh Ramalingam
Saviynt India

RBKHC
New Contributor II
New Contributor II

Hi Rajesh,

Thanks for your response but I guess I am confused about two items:

 

  1.  When using APIs in many other systems and using a JSON null I have never seen where it would put the text "null" in as a value especially when the underlying technology (MySQL) supports it and the values do not match ("null" does not equal null).  I would also expect that there be some documentation supporting a non standard implementation of an API.
  2. When I upload a user from the UI using an empty value for the CP is nulls the value on the users record. CSV example: RBKHC_0-1654532714666.png

     

To me these are inconsistent with your response of "expected behavior".

Will this "expected behavior" be the same in V2022 as well?

Thanks.

Dave
Community Manager
Community Manager

Hi @Rajesh-R - Can you help answer these questions or know anyone who can?  Thanks!

its working as expected in v2021.0

rushikeshvartak_0-1658181451562.png

curl --location --request POST 'dev.saviyntcloud.com/ECM/api/v5/updateUser' \
--header 'Authorization: Bearer exdddd' \
--header 'Content-Type: application/json' \
--data-raw '{
"username":"100041",
"customproperty64":""
}'
rushikeshvartak_1-1658181501483.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Thanks Rushikesh for you answer! Can you please try with the same request but with "customproperty64": null instead?

Yes its issue 🙂 

rushikeshvartak_0-1658267967458.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Thank you Rushikesh!

RBKHC
New Contributor II
New Contributor II

++bump