Power Community

Power Community

Creating Service Principals Really Easily Using Pac Cli

When creating integrations with Dynamics 365, one of the common steps is to set up a service principal in Azure. There are several steps to set this up, including:

  • Creating an Azure App Registration
  • Creating a secret
  • Setting up API permissions
  • Creating an Application User in the Power Platform Admin Center
  • Assigning permissions to that Application User

What if I told you you can do all of this with one PowerShell command? Let’s take a look at pac admin create-service-principal.

First, get the Environment Id for your org, which you will find in the Power Platform Admin Center here:

Open the pac cli in PowerShell and run the command below to connect to your environment:

pac auth create -env 

Make sure your org is properly selected (if you have other connections) with pac auth select.

Now run the command below to create the service principal:

pac admin create-service-principal  --environment 

You can see above, this has created everything for us. We can see in Azure the new app registration with secret created:

And API Permissions:

And Application user with System Admin privileges:

That’s it! You have now probably saved a whole lot of time and can start building those integrations.

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.

 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET’S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

ABOUT CARL DE SOUZA
image

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Unpacking the VMware Rapid Migration Plan

Allie Wolf Allie is the Marketing Manager at Dynamic Consultants Group. She graduated from Northwest Missouri State University with...

More Articles Like This

- Advertisement -spot_img