title: How to reset the password of the Service Principal created for the System Managed Identity in Azure?
body: <p>I created an Azure Container Registry with the System Managed Identity. I know how to examine the Service Principal created for it:</p>
  
  <pre><code>C:\&gt; az ad sp show --id 4***8
  {
    "accountEnabled": "True",
    "alternativeNames": [
      "isExplicit=False",
      "/subscriptions/d***8/resourcegroups/VictorTestRG/providers/Microsoft.ContainerRegistry/registries/victorTestContainerRegistry"
    ],
    "appId": "7***6",
    "displayName": "victorTestContainerRegistry",
    "keyCredentials": [...],
    "objectId": "4***8",
    "objectType": "ServicePrincipal",
    "odata.metadata": "https://graph.windows.net/2***b/$metadata#directoryObjects/@Element",
    "odata.type": "Microsoft.DirectoryServices.ServicePrincipal",
    "servicePrincipalNames": [
      "7***6",
      "https://identity.azure.net/o***F/p***="
    ],
    "servicePrincipalType": "ManagedIdentity"
  }
  </code></pre>
  
  <p>(I scrubbed certain values and omitted the fields having <code>null</code> or <code>[]</code> as their value for brevity)</p>
  
  <p>Now I would like to reset the credentials for this Service Principal, but none of following worked for me:</p>
  
  <pre><code>C:\&gt; az ad sp credential reset --name 4***8
  Resource '4***8' does not exist or one of its queried reference-property objects are not present.
  C:\&gt; az ad sp credential reset --name "7***6"
  Resource '7***6' does not exist or one of its queried reference-property objects are not present.
  C:\&gt; az ad sp credential reset --name victorTestContainerRegistry
  Resource '7***6' does not exist or one of its queried reference-property objects are not present.
  C:\&gt; az ad sp credential reset --name "https://identity.azure.net/o***F/p***="
  Resource '7***6' does not exist or one of its queried reference-property objects are not present.
  C:\&gt;
  </code></pre>
  
  <p>So, how can one reset the credentials of a System Managed Identity?</p>