DEV Community

Mohan Sharma
Mohan Sharma

Posted on

1

Azure Service Principle

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay