Resource 'ee372787-fb0b-43f7-91f2-19215f0252e7' does not exist or one of its queried reference-property objects are not present.

Manoj Pant 135 Reputation points

currently I am getting below error when trying to use :

Resource 'ee372787-fb0b-43f7-91f2-19215f0252e7' does not exist or one of its queried reference-property objects are not present.

var requestBodyMailboxSettingsReadWrite = new AppRoleAssignment

                    //Enterprise Application -> GraphAggregatorService [ApplicationID: 00000003-0000-0000-c000-000000000000] [Object Id:ee372787-fb0b-43f7-91f2-19215f0252e7]
                    ResourceId = Guid.Parse("ee372787-fb0b-43f7-91f2-19215f0252e7"),  // Id 
                    ResourceDisplayName = "Microsoft Graph",
                    // Permission Id /  Permission MailboxSettings.ReadWrite   :
                    AppRoleId = Guid.Parse("6931bccd-447a-43d1-b442-00a195474933"),

I have check the Azure Portal -> Enterprise application and GraphAggregatorService application is missing from their,

my question:

  1. How a add GraphAggregatorService inside Enterprise applications.
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,129 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 31,971 Reputation points

    Hi @Manoj Pant

    The resource id should be the service principal id of the Microsoft Graph application.

    The application id of the Microsoft Graph application is '00000003-0000-0000-c000-000000000000', and you can obtain its service principal id based on the application id.

    /servicePrincipals?$filter=appId eq '00000003-0000-0000-c000-000000000000'

    User's image

    Code snippet:

    var requestBody = new AppRoleAssignment
    	PrincipalId = Guid.Parse("{servicePrincipal-id}"),
    	ResourceId = Guid.Parse("{service principal id of the Microsoft Graph app}"),
    	AppRoleId = Guid.Parse("{appRole id}"),
    var result = await graphClient.ServicePrincipals["{servicePrincipal-id}"].AppRoleAssignedTo.PostAsync(requestBody);

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.