Hi @Anonymous ,
Thanks for reaching out.
I understand you are trying to retrieve whether the group has assigned any role or not but getting isAssignableToRole = null for every group.
As per the snippet you shared, you are using Graph API endpoint https://graph.microsoft.com/v1.0/me/memberOf to get the information related to the group you are member of.
You are using the correct endpoint to get the group details and if the group is role assignable group , you will get isAssignableToRole value true.
Make sure you are member of the group for which you assign role to the group.
You can also assign role to group using Graph API endpoint
POST https://graph.microsoft.com/v1.0/groups
{
"description": "This group is assigned to Helpdesk Administrator built-in role of Azure AD.",
"displayName": "Contoso_Helpdesk_Administrators",
"groupTypes": [
"Unified"
],
"isAssignableToRole": true,
"mailEnabled": true,
"mailNickname": "contosohelpdeskadministrators",
"securityEnabled": true
}
Reference - https://learn.microsoft.com/en-us/azure/active-directory/roles/groups-assign-role?tabs=ms-powershell
Hope this will help.
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.