Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Content Management API > SSO Group

Update a SSO group

Body parameters

priorityintegerRequired

When an user belongs to multiple groups, the role associated to the group with the highest priority will be used

Example:1
roleRequired

Sso Group's role

Type:<a href="/docs/content-management-api/resources/role">ResourceLinkage&#x3C;"role"></a>

Returns

Returns a resource object of type sso_group

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const ssoGroupId = "312";
const ssoGroup = await client.ssoGroups.update(ssoGroupId, {
id: "312",
priority: 1,
role: { type: "role", id: "34" },
});
// Check the 'Returned output' tab for the result ☝️
console.log(ssoGroup);
}
run();
{
id: "312",
name: "Admin",
priority: 1,
role: { type: "role", id: "34" },
users: [{ type: "sso_user", id: "312" }],
}