Azure 服务主体的密钥凭据和密码凭据之间的区别?

Difference between key credentials and password credentials for Azure Service Principal?

我正在使用 Python 以编程方式创建 Azure 应用程序和服务主体注册,并且还被要求为应用程序提供客户端密码。

ServicePrincipalsUpdateParameters class, it looks like I have the option to update password_credentials and key_credentials。谁能解释一下两者的区别?

PasswordCredentials 用于密码。它们是文本字符串。

KeyCredentials 用于使用证书进行身份验证。准确地说,密钥凭据包含证书的 public 密钥,对应于 Azure 门户中的此窗格(AAD -> 应用程序注册 -> 证书和机密):