Get Group Names instead of Group IDs #891

Closed
opened 2025-11-20 05:19:25 -05:00 by saavagebueno · 8 comments
Owner

Originally created by @Bastika07 on GitHub (May 14, 2024).

Describe the problem

If you have JWT group sync enabled in the self hosted version and are using Entra ID as the IDs, you will get only the group ids, but not the group names

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Se Groupnames instead of Groupids

Are you using NetBird Cloud?

Self Host

NetBird version

0.27.6

NetBird status -d output:

If applicable, add the `netbird status -d' command output.

Screenshots

image

Additional context

Originally created by @Bastika07 on GitHub (May 14, 2024). **Describe the problem** If you have JWT group sync enabled in the self hosted version and are using Entra ID as the IDs, you will get only the group ids, but not the group names **To Reproduce** Steps to reproduce the behavior: **Expected behavior** Se Groupnames instead of Groupids **Are you using NetBird Cloud?** Self Host **NetBird version** 0.27.6 **NetBird status -d output:** If applicable, add the `netbird status -d' command output. **Screenshots** ![image](https://github.com/netbirdio/netbird/assets/10380453/d414fdd1-1a20-4a27-b7b6-6f7a40638a19) **Additional context**
saavagebueno added the waiting-feedbackidpself-hostingazure labels 2025-11-20 05:19:25 -05:00
Author
Owner

@mlsmaycon commented on GitHub (May 15, 2024):

Hello @Bastika07, this seems to be a limitation from Entra ID. The NetBird service is just reading the groups provided by the identity provider; we've reports from different users with similar issues, but so far, no one has shared if there is a solution for it in Azure.

@mlsmaycon commented on GitHub (May 15, 2024): Hello @Bastika07, this seems to be a limitation from Entra ID. The NetBird service is just reading the groups provided by the identity provider; we've reports from different users with similar issues, but so far, no one has shared if there is a solution for it in Azure.
Author
Owner

@Bastika07 commented on GitHub (May 15, 2024):

Can you use for this a query with the graph rest api?
https://learn.microsoft.com/en-us/graph/api/user-list-memberof?view=graph-rest-1.0&tabs=http#http-request
https://learn.microsoft.com/en-us/graph/api/resources/groups-overview?view=graph-rest-1.0&tabs=http

I am no coding expert, so can´t help that much.

@Bastika07 commented on GitHub (May 15, 2024): Can you use for this a query with the graph rest api? https://learn.microsoft.com/en-us/graph/api/user-list-memberof?view=graph-rest-1.0&tabs=http#http-request https://learn.microsoft.com/en-us/graph/api/resources/groups-overview?view=graph-rest-1.0&tabs=http I am no coding expert, so can´t help that much.
Author
Owner

@Zaunei commented on GitHub (May 15, 2024):

It's possible to get the group names with Entra ID in Netbird, but it's really hidden and only works then groupMembershipClaims is set to ApplicationGroup. Search for cloud_displayname in this documentation about the group claims: https://learn.microsoft.com/en-us/entra/identity-platform/optional-claims#configure-groups-optional-claims

@Zaunei commented on GitHub (May 15, 2024): It's possible to get the group names with Entra ID in Netbird, but it's really hidden and only works then `groupMembershipClaims` is set to `ApplicationGroup`. Search for `cloud_displayname` in this documentation about the group claims: https://learn.microsoft.com/en-us/entra/identity-platform/optional-claims#configure-groups-optional-claims
Author
Owner

@florian-obradovic commented on GitHub (May 22, 2024):

I configured my App Registration in Entra ID as the following and it works:
CleanShot 2024-05-22 at 14 33 43@2x

Keep in mind that you can't select cloud_displayname from the ui and you have to edit the manifest.

"groupMembershipClaims": "ApplicationGroup",

"optionalClaims": {
		"idToken": [
			{
				"name": "groups",
				"source": null,
				"essential": false,
				"additionalProperties": [
					"cloud_displayname"
				]
			}
		],
		"accessToken": [
			{
				"name": "groups",
				"source": null,
				"essential": false,
				"additionalProperties": [
					"cloud_displayname"
				]
			}
		],
		"saml2Token": [
			{
				"name": "groups",
				"source": null,
				"essential": false,
				"additionalProperties": [
					"cloud_displayname"
				]

@florian-obradovic commented on GitHub (May 22, 2024): I configured my App Registration in Entra ID as the following and it works: ![CleanShot 2024-05-22 at 14 33 43@2x](https://github.com/netbirdio/netbird/assets/57985125/1de31dc2-12ca-4548-a1fb-012b54595aef) Keep in mind that you can't select **cloud_displayname** from the ui and you have to edit the manifest. `"groupMembershipClaims": "ApplicationGroup",` ``` "optionalClaims": { "idToken": [ { "name": "groups", "source": null, "essential": false, "additionalProperties": [ "cloud_displayname" ] } ], "accessToken": [ { "name": "groups", "source": null, "essential": false, "additionalProperties": [ "cloud_displayname" ] } ], "saml2Token": [ { "name": "groups", "source": null, "essential": false, "additionalProperties": [ "cloud_displayname" ] ```
Author
Owner

@florian-obradovic commented on GitHub (May 22, 2024):

If you rename groups in Entra ID, the'll remain in Netbird.
Can we track object-id in Netbird and show cloud_displayname or SAMAccountName for onPremise synched groups?

@florian-obradovic commented on GitHub (May 22, 2024): If you rename groups in Entra ID, the'll remain in Netbird. Can we track object-id in Netbird and show cloud_displayname or SAMAccountName for onPremise synched groups?
Author
Owner

@florian-obradovic commented on GitHub (May 22, 2024):

Works great, even with groups synched from onprem. active directory:

CleanShot 2024-05-22 at 15 51 42@2x

"optionalClaims": {
		"idToken": [
			{
				"name": "groups",
				"source": null,
				"essential": false,
				"additionalProperties": [
					"cloud_displayname",
                    "sam_account_name"
				]
			}
		],
		"accessToken": [
			{
				"name": "groups",
				"source": null,
				"essential": false,
				"additionalProperties": [
					"cloud_displayname",
                    "sam_account_name"
				]
			}
		],
		"saml2Token": [
			{
				"name": "groups",
				"source": null,
				"essential": false,
				"additionalProperties": [
					"cloud_displayname",
                    "sam_account_name"
				]
			}
@florian-obradovic commented on GitHub (May 22, 2024): Works great, even with groups synched from onprem. active directory: ![CleanShot 2024-05-22 at 15 51 42@2x](https://github.com/netbirdio/netbird/assets/57985125/f47ab4f7-a69a-41bc-8df8-728a18b99b7e) ``` "optionalClaims": { "idToken": [ { "name": "groups", "source": null, "essential": false, "additionalProperties": [ "cloud_displayname", "sam_account_name" ] } ], "accessToken": [ { "name": "groups", "source": null, "essential": false, "additionalProperties": [ "cloud_displayname", "sam_account_name" ] } ], "saml2Token": [ { "name": "groups", "source": null, "essential": false, "additionalProperties": [ "cloud_displayname", "sam_account_name" ] } ```
Author
Owner

@nazarewk commented on GitHub (Apr 23, 2025):

is it still an issue with latest NetBird versions?

@nazarewk commented on GitHub (Apr 23, 2025): is it still an issue with latest NetBird versions?
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#891