cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays
168
Views
5
Helpful
3
Replies
grektokomus
Beginner

CUPI: How to assign Authentication Rule to User Password Settings

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

3 REPLIES 3
Gregory Brunn
Collaborator

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.

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...

 

 

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.

Content for Community-Ad

Spotlight Awards 2021