Affected versions: 2.14.2 and previous
Fixed in: 2.15.0 and above
If you have configured OAuth using Microsoft AD in Portainer and trying to use Automatic Team membership you may run into an issue where group membership information is not returned correctly and users are not populated into the correct teams in Portainer.
Update Portainer to 2.15.0 or above.
In OAuth Config, use the following URL for Resource URL (replace the existing graph.windows.net URL)
User Identifier: unique_name
Scopes: openid profile
You will also need to have following permissions on your App Registration in Azure: