docs/sources/setup-grafana/configure-access/configure-scim-provisioning/manage-users-teams/_index.md
{{< admonition type="note" >}} Available in Grafana Enterprise and Grafana Cloud. {{< /admonition >}}
SCIM streamlines identity management in Grafana by automating user lifecycle and team membership operations. This guide explains how SCIM works with existing Grafana setups, handles user provisioning, and manages team synchronization.
With SCIM, you can:
SCIM provisioning works in conjunction with existing user management methods in Grafana. While SCIM automates user provisioning from the identity provider, users can still be created through SAML just-in-time provisioning when they log in, manually through the Grafana UI, or via automation tools like Terraform and the Grafana API. For the most consistent user management experience, we recommend centralizing user provisioning through SCIM.
{{< admonition type="note" >}}
User provisioning requires user_sync_enabled = true in the SCIM configuration. See Configure SCIM in Grafana for more information.
{{< /admonition >}}
{{< admonition type="warning" >}} After a user is provisioned through SCIM, they cannot be deleted from Grafana - they can only be deactivated through the identity provider. This is important to consider when planning your user management strategy, especially for compliance and data retention requirements. {{< /admonition >}}
For detailed configuration steps specific to the identity provider, see:
SCIM uses a specific process to establish and maintain user identity between the identity provider and Grafana:
Initial user lookup:
Identity linking based on lookup results:
Matching the User During Login:
When a user logs in via SAML, Grafana needs to securely match them to the correct user account provisioned by SCIM. This requires using a consistent, unique identifier across both processes (for example, the user's objectId in Entra ID).
assertion_attribute_login setting to specify which incoming SAML attribute contains this unique identifier.objectId in Entra ID).This process ensures secure and consistent user identification across both systems, preventing security issues that could arise from email changes or other user attribute modifications.
{{< admonition type="note" >}} During provisioning, if the identity provider sends user attributes that has no use in Grafana, those attributes will be gracefully ignored. {{< /admonition >}}
For users who already exist in the Grafana instance:
To prevent conflicts and maintain consistent user management, disable or restrict other provisioning methods when implementing SCIM. This ensures that all new users are created through SCIM and prevents duplicate or conflicting user records.
SAML Just-in-Time (JIT) provisioning:
allow_sign_up in SAML settings to prevent automatic user creationTerraform or API provisioning:
Manual user creation:
For users who don't yet exist in Grafana:
SCIM handles user synchronization but not role assignments. Role management is handled through Role Sync, and any role changes take effect during user authentication.
If you have an existing Grafana instance with manually created users and want to migrate to IDP-based SCIM provisioning, you can leverage the SCIM identification mechanism to seamlessly link existing users with their IDP identities.
The migration process uses the same user identification mechanism described earlier, but focuses on linking existing Grafana users with their corresponding IDP identities rather than creating new users.
Key benefits of this approach:
Prepare the identity provider:
Configure SCIM in Grafana:
user_sync_enabled = true{{< admonition type="note" >}}
To restrict login access to only SCIM-provisioned users, enable the [auth.scim][reject_non_provisioned_users] option. Cloud Portal users can always sign in regardless of this setting.
[auth.scim]
reject_non_provisioned_users = true
{{< /admonition >}}
Test the matching mechanism:
curl --location 'https://{$GRAFANA_URL}/apis/scim.grafana.app/v0alpha1/namespaces/{$STACK_ID}/Users?filter=userName eq "[email protected]"' \
--header 'Authorization: Bearer glsa_xxxxxxxxxxxxxxxxxxxxxxxx'
Assign users in the IDP:
Verify the migration:
Before migration:
During migration:
After migration:
Multiple users found for unique identifier:
User not found during lookup:
Authentication failures after migration:
assertion_attribute_external_uid includes the correct unique identifierSCIM provides automated team management capabilities that go beyond what Team Sync offers. While Team Sync only maps identity provider groups to existing Grafana teams, SCIM can automatically create and delete teams based on group changes in the identity provider.
{{< admonition type="note" >}}
Team provisioning requires group_sync_enabled = true in the SCIM configuration. See Configure SCIM in Grafana for more information.
{{< /admonition >}}
{{< admonition type="warning" >}} Teams provisioned through SCIM cannot be deleted manually from Grafana - they can only be deleted by removing their corresponding groups from the identity provider. Optionally, you can disable SCIM group sync to allow manual deletion of teams. {{< /admonition >}}
For detailed configuration steps specific to the identity provider, see:
{{< admonition type="warning" >}} Do not enable both SCIM Group Sync and Team Sync simultaneously as these methods can conflict with each other. However, you can use SCIM for user provisioning while keeping Team Sync for team management until migration support is available. {{< /admonition >}}
Choose one team synchronization method:
{{< admonition type="warning" >}} Team Sync Migration: Support for migrating from Team Sync to SCIM Group Sync is coming soon. Until this support is released, we recommend keeping your existing Team Sync setup for team management. You can still benefit from SCIM user provisioning capabilities while using Team Sync for team management. {{< /admonition >}}
SCIM Group Sync provides several advantages over Team Sync:
SCIM manages teams through the following process:
Group assignment:
Team creation and mapping:
Team membership maintenance: