Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > SSO Group

Sync SSO provider groups to DatoCMS roles

Returns

Returns a resource object of type sso_group

Examples

1
import { buildClient } from "@datocms/cma-client-node";
2
3
async function run() {
4
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
5
6
const ssoGroupId = "312";
7
8
const ssoGroup = await client.ssoGroups.copyRoles(ssoGroupId);
9
10
// Check the 'Returned output' tab for the result ☝️
11
console.log(ssoGroup);
12
}
13
14
run();
1
{
2
id: "312",
3
name: "Admin",
4
priority: 1,
5
role: { type: "role", id: "34" },
6
users: [{ type: "sso_user", id: "312" }],
7
}