This document details how to create credentials to use when making Azure REST API calls or when using the Azure SDK for Go.
I created this gist because my Golang app was returning empty results and when using the REST API I would see this error message:
{
"error": {
"code": "AuthorizationFailed",
"message": "The client '3c470957-xxxxxx' with object id '3c470957-xxxxxx' does not have authorization to perform action 'Microsoft.Resources/resources/read' over scope '/subscriptions/3dcd5fea-zzzzzz' or the scope is invalid. If access was recently granted, please refresh your credentials."
}