1

I'm working on an azure python app function of queue trigger type that create a VM once triggered. To do so, I need to work with the ManagedIdentityCredential() in order to acquire a credential object using CLI-based authentication but I'm having this error:

Result: Failure Exception: CredentialUnavailableError: Azure CLI not found on path Stack: File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py"

Here's the piece of code that causing the error:

import base64
import azure.functions as func
import requests
from azure.identity import ManagedIdentityCredential
from azure.mgmt.resource import ResourceManagementClient
from azure.mgmt.network import NetworkManagementClient
from azure.mgmt.compute import ComputeManagementClient

credential = ManagedIdentityCredential()```

0 Answers0