Introduction / Objective
This guide explains how to use Microsoft Entra ID groups to manage permissions in Wikit by leveraging App Roles. The principle:
- The client creates App Roles in the Entra ID "Wikit" application.
- The client assigns groups to these App Roles in "Enterprise applications".
- Entra ID automatically returns the roles in the
rolesclaim of the OpenID Connect token. - Wikit/IAM maps this claim to Wikit roles/groups.
This method is suitable for multi-tenant SaaS as App Roles are portable and application-specific.
Prerequisites
- Entra ID administrator rights allowing application management (e.g., Cloud Application Administrator).
- Wikit application already created in Entra ID (see Wikit/Entra OIDC SSO guide).
- Redirection URL provided by Wikit, in the format:
https://auth.wikit.ai/realms/{realm}/broker/{slug-organization}/endpoint - One or more existing Entra ID groups, containing the users to be authorized.
- Entra ID P1/P2 license required if you assign groups to an application.
Client-side Steps (Microsoft Entra ID)
Steps 1 to 6 below complete your existing SSO procedure. If the Wikit application is not yet created, first follow the "OpenID Connect Configuration with Microsoft Entra ID" guide.
Step 1: Access the Azure Portal
- Log in to the Azure portal.
- Navigate to App registrations.
Step 2: Open the Wikit Application
- In App registrations, select the Wikit application you created (e.g.,
Wikit - {slug-organization}).
Step 3: Create App Roles
In the application menu, click on App roles.
Click on Create app role.
Fill in the fields:
- Display name: Readable name of the role (e.g.,
Wikit Admin). - Allowed member types:
Users/Groups(mandatory for assigning groups). - Value: Technical value sent in the token (e.g.,
wikit_admin,wikit_editor,wikit_viewer). - Description: Short description (e.g., "Wikit administrator access").
- Do you want to enable this app role?:
Yes.
- Display name: Readable name of the role (e.g.,
Click on Apply.
Repeat for each necessary role.
Reasonable assumption:
Valuevalues will be used as-is on the Wikit side. If you want a different nomenclature, provide a mapping table to Wikit (see dedicated section).
Step 4: Assign Groups to App Roles
- In Azure, go to Enterprise applications.
- Select the corresponding Wikit application.
- Menu Users and groups.
- Click on Add user/group.
- In Users and groups, select the group to associate.
- In Select a role, choose the App Role created in Step 3.
- Click on Assign.
Repeat for each group ↔ App Role pair.
Step 5: Verify that roles is emitted
As soon as an App Role is assigned to a user (directly or via group), Entra ID automatically adds a roles claim to the OIDC token.
You can verify this by performing a test connection and inspecting the ID token (using a tool like jwt.ms).
Connection Test
- Add a test user to a group assigned to an App Role.
- Connect to Wikit via Entra ID.
- Verify that:
- the user can access Wikit,
- the permissions correspond to the expected role.
If necessary, Wikit can validate the presence of the roles claim in IAM after connection.
Troubleshooting / Common Errors
The roles claim is missing from the token
- No App Role is assigned to the user / group. → Check Enterprise applications > Users and groups. oai_citation:7‡Microsoft Learn
- The App Role was created with Allowed member types = Applications only. → Recreate the role with
Users/Groups.
Wikit permissions do not match
- Incorrect
Valuecommunicated or mapped. → Verify the exact technical value of the App Role. - A user belongs to multiple groups assigned to different App Roles. → The token contains multiple values in
roles. Wikit will apply all or a priority based on your configuration.
Group changes are not taken into account
- Roles are recalculated at each authentication. → Ask the user to log out / log back in.
Points of Attention
- Value Stability: Prefer generic and durable
Values (e.g.,wikit_admin) rather than organization-specific names. - Fewer Roles = Better: A simple hierarchy limits ambiguous combinations.
- Access Management: Assigning groups to the Wikit application also controls visibility in "My applications".
- Do not use
acceptMappedClaimsor advanced transformation policies for a multi-tenant app, unless explicitly needed.