Skip to content

Group Mappings

Group mappings connect identity provider (IdP) groups to Shoehorn teams. A mapped team follows its group: people in the group join the team, and people who leave the group leave the team, along with the roles the team gives them.

  1. Map an IdP group to a Shoehorn team.
  2. Shoehorn reads the group’s members from your IdP every few minutes, and when you click Sync Now on the team’s Group Mappings tab.
  3. People in the group are added to the team, and anyone no longer in the group is removed from it.
  1. Go to Admin > People & Access > Teams and open a team.
  2. Go to the Group Mappings tab.
  3. Click Add Mapping and pick the IdP group.
Terminal window
curl -X POST https://shoehorn.example.com/api/v1/admin/teams/<team-id>/mappings \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"idp_group_id": "00g1abcd2efgh3ijk4l5",
"idp_group_name": "engineering-platform",
"provider": "okta",
"sync_enabled": true
}'
Terminal window
curl https://shoehorn.example.com/api/v1/admin/teams/<team-id>/mappings \
-H "Authorization: Bearer <token>"
Terminal window
curl -X POST https://shoehorn.example.com/api/v1/admin/teams/<team-id>/mappings/sync \
-H "Authorization: Bearer <token>"
Terminal window
curl -X DELETE https://shoehorn.example.com/api/v1/admin/teams/<team-id>/mappings/<mapping-id> \
-H "Authorization: Bearer <token>"

Removing a mapping also removes the people it added to the team, unless another of the team’s mappings still lists them.

Provider Group Claim Notes
Zitadel groups Groups managed in Zitadel organizations
Okta groups Okta group names sent via OIDC
Microsoft Entra ID groups Azure AD security groups
Keycloak groups Keycloak realm groups
  • A team can have several group mappings. Someone stays on the team while any of them lists them.
  • People you add to a team by hand stay until you remove them. A sync never removes them.
  • If you remove someone that a mapped group still lists, the next sync adds them back. Take them out of the group in your IdP instead.
  • A sync only removes people when your IdP has returned the full member list of every group mapped to the team. If your IdP can’t be reached, or one of the groups has more than 1,000 members, nobody on that team is removed.
  • After the background sync removes someone, their roles can take up to five minutes to update. Sync Now updates them right away.

The tenant ID strategy determines how Shoehorn extracts the tenant from JWT claims. This is configured via environment variables:

Strategy Env Var Description
provider_claim TENANT_ID_CLAIM_KEY=azp Use a specific JWT claim
urn_claim TENANT_ID_CLAIM_KEY=urn:zitadel:iam:org:id Extract from URN claim
group_prefix TENANT_GROUP_PREFIX=tenant: Extract from group prefix
env_var DEFAULT_TENANT_ID=default Use environment variable