azureautomation / runbooks

Sample Automation runbooks
MIT License
150 stars 128 forks source link

Issue with Update-AutomationRunAsCredential #62

Open liviadhalim opened 4 years ago

liviadhalim commented 4 years ago

image

I have run the four prerequisites of the script that are put as comments in the script. Any idea what this error means?

Thank you.

upadhyayatul15 commented 4 years ago

I am getting the same error ? Is there any other permission I am missing ?/

zhijli commented 4 years ago

I have the same issue. I confirm that my app has added it's SP as owner of the AAD app, and the app already have "Application.ReadWrite.OwnedBy" permission for "Microsoft Graph API", anything I'm missing?

One thing I want to call out and get confirmed: The script is adding permission to Windows Azure Active Directory(00000002-0000-0000-c000-000000000000), while I'm adding permission to "Microsoft Graph Api" as the portal said “Azure Active Directory Graph” is replaced by "Microsoft Graph Api". I'm not sure if this will cause such issue?

upadhyayatul15 commented 4 years ago

Adding permission to "Microsoft Graph Api" is fine, I have done it in the same way.

zhijli commented 4 years ago

[Update]:Adding Application.ReadWrite.OwnedBy to Azure Active Diectory Graph resolve my issue.