1. Scripting SDK

Policies client

The Policies client can be used to provide read and update operations on policies. These policies can only be created and deleted from inside Content Hub. From outside, they can only be retrieved or modified.

Get user policies

To get a user's policy, use GetUserPolicyAsync:

var policy = await MClient.Policies.GetUserPolicyAsync(<USER_ID>);

Get user group policies

To get a user group's policy, use GetUserGroupPolicyAsync:

var policy = await MClient.Policies.GetUserGroupPolicyAsync(<USERGROUP_ID>);

Update policies

After making changes to a policy, you can update it as follows:

await MClient.Policies.UpdateAsync(<POLICY>);
If you have suggestions for improving this article, let us know!