title: ParentResourcePath when using Invoke function of GetResource class in C# Pulumi Azure Native
body: <p>Trying get Managed Identity resource (auto created by AKS AGIC add-on) principal id as following</p>
  <pre class="lang-cs prettyprint-override"><code>var agicAddonManagedIdentityResource = GetResource.Invoke(new GetResourceInvokeArgs {
      ResourceName = agicAddonManagedIdentityName,
      ResourceGroupName = aksAppClusterNodeRgName,
      ParentResourcePath = &quot;&quot;,
      ResourceProviderNamespace = &quot;Microsoft.ManagedIdentity&quot;,
      ResourceType = &quot;userAssignedIdentities&quot;
  });
  
  var roleAssignmentId = agicAddonManagedIdentityResource.Apply(resourceResult =&gt; {
  
      var agicAddonManagedIdentityPrincipalId = resourceResult?.Identity?.PrincipalId;
      
      // assign role here
      
  });
  
  </code></pre>
  <p>When <code>ParentResourcePath</code> is set <code>&quot;&quot;</code>, getting following error:</p>
  <blockquote>
  <p>Detail=&quot;invocation of azure-native:resources:getResource returned an error: request failed /subscriptions/***/resourcegroups/MC_xxx/providers/Microsoft.ManagedIdentity//userAssignedIdentities/ingressapplicationgateway-xxx: autorest/azure:</p>
  </blockquote>
  <blockquote>
  <p>Service returned an error. Status=400 Code=&quot;NoRegisteredProviderFound&quot; Message=&quot;No registered resource provider found for location 'japaneast' and API version '2019-05-01' for type 'userAssignedIdentities'. The supported api-versions are '2015-08-31-PREVIEW, 2018-11-30'.</p>
  </blockquote>
  <p>When <code>ParentResourcePath</code> is not set, getting following error:</p>
  <blockquote>
  <p>System.ArgumentNullException: [Input] Pulumi.AzureNative.Resources.GetResourceInvokeArgs.ParentResourcePath is required but was not given a value (Parameter 'ParentResourcePath')</p>
  </blockquote>
  <p>I don't understand why <code>ParentResourcePath</code> is required, then how to get resources that are not child resource!</p>
  <p><strong>How to get managed identity resource that belongs to node resource group of AKS?</strong></p>
  <blockquote>
  <p>Info: using &quot;Pulumi Azure Pipelines Task&quot; (version: 1.0.13) in Azure DevOps pipeline</p>
  </blockquote>