Can't integrate Azure in android mobile application

Anonymous
2023-09-25T16:05:41.3366667+00:00

Hi,

We try to integrate Azure in android mobile application. We have made all the configurations on the application side, but when authorizing we do not receive the role in the logs, we just receive an empty value. Please help me solve the problem.

In attachment you can see logs. As you see we have NULL (((

queries (1) (1).txt

The request with which we request a role.


graphClient.me().memberOf()

               .buildRequest()

               .get(new ICallback<IDirectoryObjectCollectionWithReferencesPage>() {

                   @Override

                   public void success(IDirectoryObjectCollectionWithReferencesPage iDirectoryObjectCollectionWithReferencesPage) {

                       displayGraphResult(iDirectoryObjectCollectionWithReferencesPage.getRawObject());

                   }


                   @Override

                   public void failure(ClientException ex) {

                       Log.e(TAG, "CallGraph getRole failed: " + ex.toString());

                   }

               });
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 30,296 Reputation points Microsoft Employee Moderator
    2023-09-26T06:58:20.3633333+00:00

    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.

    User's image

    User's image

    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.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-09-26T11:03:46.7166667+00:00

    Hi @Shweta Mathur

    A lot of thanks for your answer!

    I check https://graph.microsoft.com/v1.0/me/memberOf and I get NULL ((

    What should we do in that case?

    Regards,

    AlexandraUser's image

    0 comments No comments

  2. Anonymous
    2023-09-27T06:34:50.14+00:00

    Please, could you help me


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.