03-03-2021 09:20 AM
Is it possible via the Unity API (CUPI) to assign an Authentication Rule to the User's Password settings?
In the UI, under Users > Edit User Basics >Edit > Password Settings > Authentication Rule, there is a drop down list. I want to assign one of the choices from this list to the user via the API.
I have acquired the Authentication Rule to be assigned. Have not been able to find an attribute of User or a nested attribute where this rule can be assigned.
Any help would be greatly appreciated.
--Greg
03-03-2021 01:02 PM
Hey Greg,
Have you done a get on the
https://<cucserver>/vmrest/users/<user object id>/credential/password
While I can't find a doc there is the credential policy object id field here is but there is a field I would expect aligns with that field to align with the policy.
Let me see if I can test.
03-03-2021 01:28 PM
Yeah I can toggle the parameter on the user in the gui and I see this field change. Question is the put to change it...
03-03-2021 05:16 PM
Yup put works to change this. Tested the put in post man
Put
https://<CUC>/vmrest/users/<user guid>/credential/password
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Credential>
<CredentialPolicyObjectId>GUID of the object ID of the auth policy</CredentialPolicyObjectId>
</Credential>
Working so predicted. Let me know if you need help scripting this via python to update your users.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide