You can use graph explorer - Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph - to verify what Groups are available within M365
NOTE: Before proceeding with the steps below, you will need Global Admin Access to the tenant.
Below are the steps:
1. Go to: Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph - then sign in with your M365 tenant
2. To display all the Groups within your tenant add /groups in front of the default GET command:
Example: https://graph.microsoft.com/v1.0/groups
3. Click Run query
Below is the output:
4. As you scroll down you should be able to see all the Groups available in the Tenant
To look specifically at Groups which a specific user may be in
To display a users Groups within your tenant add /users/email/transitiveMemberOf in front of the default GET command:
Example: https://graph.microsoft.com/v1.0/users/{user's email}/transitiveMemberOf/microsoft.graph.group?$count=true > Click Run query
To look specifically at AD data for a specific user
To display a users AD data within your tenant add /users/[user address] in front of the default GET command:
Example: https://graph.microsoft.com/v1.0/users/{user's email} > Click Run query