The pac auth list command lists all authentication profiles on your machine. A browser will open, so you can select your account to login. (preview) use azure devops federation for service principal auth
Joselis Johana Bolívar on Twitter: "Quiero cabalgar en tu tronco"
Open the pac cli in powershell and run the command below to connect to your environment
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 You can see above, this has created everything for us. While beginners often start with simple commands for authentication or solution export, advanced pac cli commands offer much more—from alm automation and environment management to data operations, solution checking, and code generation. Now that you’ve got pac cli working you’ll likely want to connect to a tenant and, potentially, select a specific organization to work with using commands
You’ll use the pac auth command to connect, list, and select a tenant. Hover over a profile and you can either select (star) or delete (recycle bin) a profile If you need to clear all auth profiles at once, you can select the small list icon with the x at the top right next to add profile and refresh profiles. This reference informs the solution project about which code components should be added during the build.
If you are using it anywhere else, or if you want to use a different account, you can use 'pac auth create'