Limitation on retrieveGroupInfo function in WindowsAad.php

Created on 8 June 2023, about 1 year ago
Updated 30 June 2023, 12 months ago

Problem/Motivation

By default, https://graph.microsoft.com/v1.0/me/memberOf displays only the first 100 groups to which the logged-in user belongs. If the user belongs to more than 100 groups, manually assigned roles (role|group) will not be set for the user, and only the authenticated role will be used. The API can retrieve up to 999 groups the user belongs to by using the $top=999 parameter, which can help extend this limit effectively.

Steps to reproduce

Test it with users that belong to more than 100 groups.

Proposed resolution

To bypass the 100 default values, and add a logic to, show the max groups allowed by the API (999) is described below.

From:

case 2:
$uri = 'https://graph.microsoft.com/v1.0/me/memberOf';
break;
To:
case 2:
$uri = 'https://graph.microsoft.com/v1.0/me/memberOf?$top=999';
break;

Adding the patch file to this issue.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain eduardo.arana

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024