Share via

Get onPremisesPublishing using Graph API

Dmitry Apunevich 1 Reputation point
2021-04-15T09:19:13.207+00:00

Hello,

I am looking for how to get onPremisesPublishing property of AAP application.

When I use GET /beta/applications/{id}/?$select=onPremisesPublishing i get

{  
  "error": {  
    "code": "NotAdminRoleNoEnoughCustomPermission_UnauthorizedAccess",  
    "message": "Unauthorized Access.",  
    "innerError": {  
      "date": "2021-04-14T17:00:37",  
      "request-id": "",  
      "client-request-id": ""  
    }  
  }  
}  

I have Application.Read.All Application permission
88167-perms.png

Any other permissions required or there is something else?

Thanks in advance for any help!

Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Siva-kumar-selvaraj 15,741 Reputation points Volunteer Moderator
    2021-04-19T11:04:19.627+00:00

    Hello @Dmitry Apunevich ,

    Thanks for reaching out.

    I would request you to assign following API permission Directory.AccessAsUser.All along with Application.Read.All which must work, even I was getting same error without Directory.AccessAsUser.All .

    89103-image.png

    Success outcome:
    89132-image.png

    ------
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    Was this answer helpful?


Your answer

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