title: Resource Graph query using Azure Function .NET and User managed Identity?
body: <p>In the <a href="https://docs.microsoft.com/en-us/azure/governance/resource-graph/first-query-dotnet" rel="nofollow noreferrer">example</a> the DotNet-ResourceGraphClient requires ServiceClientCredentials. I do not know how to use a user-assigned-managed-identity directly.
  For instance:</p>
  <pre><code>var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = umiClientId }); 
  ResourceGraphClient argClient = new ResourceGraphClient(serviceClientCreds);
  results in: Argument 1: cannot convert from 'Azure.Identity.DefaultAzureCredential' to 'Microsoft.Rest.ServiceClientCredentials'.
  </code></pre>
  <p>I found a <a href="https://cloud-right.com/2020/05/azure-functions-resource-graph" rel="nofollow noreferrer">PHP-example</a> with credentials = MSIAuthentication(). Can anyone provide a similar example for dotnet-azure-resource-graph-sdk?
  Thanks</p>