How to map Microsoft Entra ID groups to user groups
Group mapping for Microsoft Entra ID: the groups claim in the ID token, the Group mapping switch in Login methods, rules on Object IDs, statuses and faults.
You will learn
- How to add the groups claim to the token Microsoft Entra ID sends NextTables at log in.
- How to switch on group mapping in Login methods and confirm that the claim arrives.
- How to link a user group to one or more Entra ID groups with a rule.
- When membership changes, and what the statuses Active, No match yet and Suspended mean.
This article is for NextTables administrators and the Microsoft Entra ID administrators who work with them. A user group linked to Entra ID takes its members from the groups a user belongs to in your directory: whoever is in the Entra ID group inherits the roles of the NextTables user group at their next Microsoft log in. The groups travel inside the ID token NextTables already receives at log in, so no Microsoft Graph permission and no tenant admin consent are needed, and NextTables never reads your directory. How user groups themselves work is explained in How to set up user groups in NextTables.
Prerequisites
- Log in with Microsoft is set up and enabled for NextTables. See How to enable single sign-on with Microsoft and Google.
- In NextTables, the App settings permission at site level to switch on group mapping, and the Manage users permission at site level to create user groups, or the Administrator role.
- In Microsoft Entra ID, permission to change the app registration you created for NextTables.
- The users who should get roles are invited to NextTables. Group mapping never creates users; it only gives roles to users who already have an account.
Step-by-Step Instructions
The setup has two parts: the Entra ID administrator adds the groups claim to the token, then a NextTables administrator switches on group mapping and links user groups to Entra ID groups.
1) Add the groups claim in Microsoft Entra ID
- In the Microsoft Entra admin center, open App registrations and select the app you registered for NextTables.
- Open Token configuration and click Add groups claim.
- Choose the group types to include: Security groups, Directory roles, All groups or Groups assigned to the application.
- Make sure the claim is added to the ID token and keep the default value, the group ID. NextTables reads the ID token only.
- Save. Entra ID now sends the Object IDs of the user's groups in a claim named groups.
💡 Tip: Microsoft recommends Groups assigned to the application for large organizations, because a token holds at most 200 groups. With this option, assign every Entra ID group you want to map to the app under Enterprise applications, Users and groups. It sends only direct members of the assigned groups, and assigning groups to an app needs a Microsoft Entra ID P1 license. See Microsoft's guide Configure group claims for applications.
2) Find the Object ID of each Entra ID group
- In the Microsoft Entra admin center, open Groups, All groups, and select the group.
- Copy the Object ID from the group's Overview.
Use the Object ID as the value in NextTables. It is unique and never changes, while a group's display name can be renamed or reused. NextTables compares values exactly and case-sensitively, so paste the ID without spaces.
3) Switch on group mapping in NextTables
- Click your profile avatar, then Administration, then Login methods.
- In the card Enable Microsoft IDP, find the panel Group mapping. Its switch is available only while the Microsoft login method is enabled.
- Switch Group mapping on. The dialog Add group claim name opens with groups as the Name. Keep it, unless your Entra ID administrator sends the groups under another claim name. Then click Add name.
- The panel shows "Waiting for the first Microsoft log in to confirm the claim". As soon as a user logs in with Microsoft and the token carries the claim, it shows "Claim confirmed at the last Microsoft log in" with the date and time.
- To change the name later, click Edit beside Group claim name. Rules you already wrote keep the claim names they use.

⚠️ Caution: Group mapping applies to the whole NextTables installation. Switching it off suspends every user group linked to Entra ID: their members lose the roles they get through them until you switch it back on. The dialog Switch off group mapping? shows how many groups and users are affected before anything changes. Disabling the Microsoft login method switches group mapping off as well, and enabling Microsoft again does not switch it back on.
4) Link a user group to the Entra ID group
- Open Administration, User groups and click Add group, or select an existing group and click Edit user group.
- Enter the name and description and select the roles every member should inherit.
- Under Membership, choose Linked to Entra ID. The first condition starts with Where, with your group claim name and the operator = is equal to... already filled in.
- Paste the Object ID of the Entra ID group into Value.
- To include the members of a second Entra ID group, click Add condition, choose Or at the start of the new row, enter the claim name, for example groups, and the second Object ID. And or Or applies to the whole rule.
- Click Add group or Update group.

While group mapping is off, a banner says the group will be saved as suspended and grant no roles until group mapping is switched on in Login methods. Each condition uses one of four operators:
| Operator | The condition holds when |
|---|---|
| = is equal to... | the claim contains the value. For the group claim: the user is a member of that Entra ID group. |
| ≠ is not equal to... | the claim is present and none of its values equals the value. |
| is empty | the claim is missing from the token or has no value. |
| is not empty | the claim has at least one value. |
A rule that uses is not equal to, is empty or is not empty must use And and contain at least one is equal to. Without that anchor, one mistyped value would match every user who logs in. A condition may also name another claim of the ID token, for example roles for app roles, as long as your Entra ID administrator adds it to the token.
5) Check the result after the first log ins
- In the list, a linked group shows Members from Entra ID and one of three statuses: No match yet until a Microsoft log in matches its rule, Active afterwards, and Suspended while group mapping is off.
- Members counts the users seen at log in, which is not the size of the Entra ID group. Last log in is the latest log in by a member, which for a linked group is also when the rule last matched.
- Select the group and click View user group to see the rule in words and the members known from log in, each with the date it was Last confirmed.

📝 Note: Membership changes when a user logs in. At each Microsoft log in, NextTables reads the group claim, adds the user to every linked group whose rule matches and removes them from every linked group whose rule does not. A log in with a password or with Google carries no Entra ID groups, so NextTables removes the user from every active linked group; their next Microsoft log in restores the memberships. Refreshing a session changes nothing. Users who get their roles through Entra ID should therefore log in with Microsoft.
Changing the rule of a linked group removes its known members; each one comes back at their next log in if the new rule matches. Switching a group from Managed in NextTables to Linked to Entra ID removes the members added by hand. Switching it back to Managed in NextTables keeps the current members, and from then on you add and remove them yourself. NextTables asks for confirmation in each case.
Troubleshooting / FAQs
1. Does NextTables need a Microsoft Graph permission or tenant admin consent?
No. The groups travel inside the ID token NextTables already receives at log in. NextTables never reads your directory.
2. I removed a user from the Entra ID group, but they still have the roles.
Membership changes at the user's next log in. Until then the user keeps the inherited roles. To take away access at once, select the user on the Users page and set them inactive.
3. A user lost their inherited roles after logging in with a password or with Google.
That is expected. Only a Microsoft log in carries the user's Entra ID groups, so any other log in removes the user from the active linked groups. They get the memberships back at their next Microsoft log in. Groups managed in NextTables are not affected.
4. The panel in Login methods keeps saying "Waiting for the first Microsoft log in to confirm the claim".
No Microsoft log in has carried a claim with the configured name yet. Check that the groups claim is added to the ID token of the app registration (step 1) and that the Group claim name matches the claim name exactly, including upper and lower case. While the claim is missing, NextTables reads every Microsoft log in as "member of no group" and removes the user from the linked groups.
5. The linked group stays at No match yet.
No Microsoft log in has matched the rule since you saved it. Check that a member of the Entra ID group has logged in with Microsoft since then, that the claim is confirmed in Login methods, that the Object ID is complete and has no extra space, and, if the claim sends only Groups assigned to the application, that the group is assigned to the app. NextTables can't check whether an Object ID exists in your directory.
6. Login methods says the claim could not be read from the last Microsoft log in.
The claim was in the token, but not as a list of group IDs, so NextTables left all memberships unchanged. Check in the groups claim settings of the app registration that the value is the group ID (step 1).
7. Login methods says the log in carried more groups than the token can hold.
The user belongs to more than 200 groups, so Entra ID replaced the group claim with an overflow marker, and NextTables left the memberships unchanged. Switch the groups claim to Groups assigned to the application and assign the groups you map to the app.
8. Why can't I add or remove members of a linked group by hand?
Its membership follows the rule. Change the membership of the Entra ID group instead, or switch the user group to Managed in NextTables.
9. Can a linked group carry the Administrator role?
Yes, and only an Administrator can set this up. Everyone the rule matches at log in then becomes an Administrator in NextTables, so whoever manages the Entra ID group decides who holds the role. At least one user always keeps the Administrator role personally, so the last Administrator never depends on a group.
10. Does group mapping work with Google?
No. Google sends no group claim, so group mapping is available for Microsoft only. User groups managed in NextTables work with every login method.
11. Can two user groups use the same Entra ID group?
Yes. A user who matches both rules is a member of both groups and inherits the roles of both.


