For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage Users and Roles

Interlynk controls access with role-based access control (RBAC). Every user in an organization holds one role, and a role is a named set of permissions. The API lets you invite users, change the role a user holds, remove users, and define custom roles.

How access works

Concept
What it is

Role

A named set of permissions, scoped to one organization.

Permission

A single capability, for example invite_users or view_sbom.

Member

A user attached to an organization with exactly one role.

Three system roles exist in every organization: Admin (all permissions), Operator, and Viewer (read-only). Enterprise organizations can also define custom roles. The actions below each require a permission, so the token you use must belong to a user whose role grants it.

Action
Mutation
Permission required

Add a user

organizationUserInvite

invite_users

Change a user's role

organizationUserUpdate

edit_user_role

Remove a user

organizationUserRemove

delete_user

Create or change a role

organizationRole*

edit_user_role, update_organization

Configure SSO

samlConfig*

edit_connections

A token without the permission gets You are not authorized to perform this action on User. The Admin role holds every permission.

Find role and user IDs

The user-management mutations take a userId and an organizationRoleId. Read both from the organization query.

List roles

List members

invitationStatus is invited for a pending invitation, accepted once the user joins, declined, or pending_registration.

Add a user

organizationUserInvite invites a user by email and assigns a role. Pass the organizationRoleId from the roles list. The user gets an email and shows as invited until they accept.

Change a user's access level

organizationUserUpdate changes the role a user holds. Pass the userId and the target organizationRoleId.

Remove a user

organizationUserRemove detaches a user from the organization. Pass the userId. This removes the membership; it does not delete the person's Interlynk account.

To leave an organization yourself, use organizationUserLeave with an organizationId instead.

Custom roles

Custom roles are an Enterprise feature. On other tiers the role mutations return a tier error, and you work with the built-in Admin, Operator, and Viewer roles.

Create a role

organizationRoleCreate takes a name and the full list of permission keys. See the permission reference for valid keys.

Update a role

organizationRoleUpdate takes permission deltas, not a full list. Each entry is a permissionKey and a value: true adds the permission, false removes it. Permissions you do not mention stay as they are.

Assign a role to many users

organizationRoleBulkApply moves a list of users onto one role in a single call.

Delete a role

organizationRoleDelete removes a custom role. Move any users off it first.

Single sign-on

SSO is the preferred way to run access at any scale past a handful of people. Connect your SAML identity provider once and new users are provisioned on first login with a default role, so you do not invite them one at a time. Deactivating a user in your IdP cuts their access.

SSO is an Enterprise feature configured with the samlConfig mutations. Reading the config needs view_connections; creating or updating it needs edit_connections; deleting it needs delete_connections.

Read the current SSO config

samlConfig is null until you create one.

Create the SSO config

samlConfigCreate reads your identity provider's metadata URL and extracts the SSO service URL and signing certificate for you. The defaultUserRoleId sets the role every new SSO user receives on first login. Pick a least-privileged role such as Viewer.

The arguments:

Argument
Description

metadataUrl

Your IdP's SAML metadata URL. Must be reachable; the server fetches it.

assertionConsumerServiceUrl

The ACS URL the IdP posts responses to.

tenant

A short identifier for your organization, used in the callback URL.

issuer

The service provider entity ID.

defaultUserRoleId

Role assigned to new SSO users.

attributeStatements

Optional custom attribute mappings.

If the metadata URL cannot be fetched or parsed, the mutation returns the parse errors and writes nothing.

Update or disable SSO

samlConfigUpdate changes the config. defaultUserRoleId is required on update; the other fields are optional. Set enabled: false to switch SSO off without deleting the configuration.

To remove SSO entirely, call samlConfigDelete with the config id.

Permission reference

Common permission keys, by category. Read the live set for a role from the organizationRoles { permissions } query.

Category
Keys

User Management

view_users, invite_users, edit_user_role, delete_user

Organization

view_organization, update_organization

Product

view_product_group, create_product_group, update_product_group, delete_product_group

SBOM

view_sbom, update_sbom, edit_sbom_components, edit_vulnerabilities, delete_sbom

Connections

view_connections, edit_connections, delete_connections

Errors

Message
Cause

You are not authorized to perform this action on User

The token's role lacks the permission for this action.

User does not have permission to invite to this role to this organization

A non-admin tried to invite to a role other than its own.

You are not authorized to perform this action on SamlConfig

The token lacks edit_connections (or view_connections to read).

Metadata url could not be parsed: ...

The SSO metadataUrl was unreachable or not valid SAML metadata.

See Errors for the general error model.

Last updated