79216628

Date: 2024-11-22 21:36:22
Score: 0.5
Natty:
Report link

Ok, I was able to use @Miao Tian-MSFT's answer to get the token I needed.

$accessToken = az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query "accessToken" --output tsv

However, I also later discovered the piece I was missing - on the Agent job, be sure to check the "Allow scripts to access the OAuth token" box. That's what provides the $System.AccessToken to the scripts (making the above call unnecessary).

enter image description here

Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • User mentioned (1): @Miao
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: end-user