An Azure service principal is an identity created for use with applications, hosted services, and automated tools to access Azure resources. This access is restricted by the roles assigned to the service principal, giving you control over which resources can be accessed and at which level.
With password-based authentication, a random password is created for you. If you do not specify a --name parameter value, a name containing a time stamp will be created for you. The difference between a managed identity and a service principal is that a managed identity manages the creation and automatic renewal of a service principal on your behalf.
--CREATE SERVICE PRINCIPLE
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/id"
--QUERY SERVICE PRINCIPLE
az ad sp list --display-name <DisplayName>
Top comments (0)