title: Difference between key credentials and password credentials for Azure Service Principal?
body: <p>I'm programmatically creating Azure application and service principal registrations using Python and have been asked to provide a client secret for the apps as well.</p>
  
  <p>In the <a href="https://docs.microsoft.com/en-us/python/api/azure-graphrbac/azure.graphrbac.models.serviceprincipalupdateparameters?view=azure-python" rel="nofollow noreferrer">ServicePrincipalsUpdateParameters</a> class, it looks like I have the option to update <a href="https://docs.microsoft.com/en-us/python/api/azure-graphrbac/azure.graphrbac.models.passwordcredential?view=azure-python" rel="nofollow noreferrer">password_credentials</a> and <a href="https://docs.microsoft.com/en-us/python/api/azure-graphrbac/azure.graphrbac.models.keycredential?view=azure-python" rel="nofollow noreferrer">key_credentials</a>. Can anyone explain the difference between the two?</p>