-1

while executing New-AzureADApplicationKeyCredential from Azure Automation runbook its throwing error :

Error occurred while executing SetApplication Code: Authorization_RequestDenied Message: Insufficient privileges to complete the operation. RequestId: 59574612-93fa-4e13-b409-4fab03e6fe6f DateTimeStamp: Mon, 22 Jun 2020 11:08:33 GMT HttpStatusCode: Forbidden HttpStatusDescription: Forbidden HttpResponseStatus: Completed (Error occurred while executing SetApplication Code: Authorization_RequestDenied Message: Insufficient privileges to complete the operation. RequestId: 59574612-93fa-4e13-b409-4fab03e6fe6f DateTimeStamp: Mon, 22 Jun 2020 11:08:33 GMT HttpStatusCode: Forbidden HttpStatusDescription: Forbidden HttpResponseStatus: Completed )

I have already provided below API permissions for the Azure application of Automation Account :

enter image description here

Is there anything that I am missing ?

Thanks,

AUGgn
  • 47
  • 8

2 Answers2

0

Adding Azure Active Directory Graph API permissions worked for me , Thank you .

enter image description here

AUGgn
  • 47
  • 8
-1

Run As Accounts might not have the same permissions against Azure resources as your current Automation account.

Resolution:-

Ensure that your Run As account has permissions to access any resources used in your script.

OR

Please go through this Doc:- https://learn.microsoft.com/en-us/azure/automation/troubleshoot/runbooks

PHP Bugs
  • 1,133
  • 12
  • 23