My current project involves utilizing Azure Storage, and to authenticate I am leveraging the DefaultAzureCredential. After logging in with the az login
command, I encountered an error response when running my Azure function.
{ "message": "{"odata.error":{"code":"AuthorizationPermissionMismatch","message":{"lang":"en-US","value":"This request is not authorized to perform this operation using this permission.\nRequestId:1fedb6ef-3002-0070-7133-fc1d53000000\nTime:2023-10-11T11:09:48.2823331Z"}}}" }
Upon attempting to troubleshoot in the console:
const credential = new DefaultAzureCredential();
console.log(credential)
The output showed:
DefaultAzureCredential { [2023-10-11T11:17:18.644Z] UnavailableMessage: 'DefaultAzureCredential => failed to retrieve a token from the included credentials. To troubleshoot, visit [https://aka.ms/azsdk/js/identity/defaultazurecredential/troubleshoot.'](https://aka.ms/azsdk/js/identity/defaultazurecredential/troubleshoot.%27), [2023-10-11T11:17:18.645Z] _sources: [
I am puzzled as to why tokens are not being retrieved from my CLI. Even after attempting to use AzureCliCredential, the issue persists.
If anyone has insights on how to address this problem, please share your solutions.
My setup includes a Macbook Air M1 2020 running OS Ventura 13.3.