Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for PACX ⁓ Connect to Dataverse environment
Riccardo Gregori
Riccardo Gregori

Posted on

PACX ⁓ Connect to Dataverse environment

Weintroduced PACX here, as a toolbelt containing commands to streamline the application development on Dataverse environments.

In order to run a command,PACX must be aware of the Dataverse environment where you want to run the command. This can be achieved using commands underpacx auth namespace.


Create a new auth profile

Thepacx auth create command can be used to create a new connection vs a Dataverse environment. It takes as inputs:

Please remember to enclose the connection string in double quotes "...": some terminal handles the semicolon (;) in the connection string as a command delimiter.This causes an error while trying to connect to dataverse.

Once executed, the command will try to use the provided connection string to connect to the environment and executes aWhoAmI request to ensure that the connection works properly. If succeeded, it creates and saves on the local machine an authentication profile called as specified in the--name argument, and sets it asdefault for the next command executions.

You can create as many authentication profiles as you need.pacx auth list command can be used to list all of them, whilepacx auth select allows to select which auth profile must be use in the subsequent commands.

List all auth profiles

Thepacx auth list command can be used to list all the authentication profiles stored in the local machine. It does not require any argument, and will provide the following output

pacx auth list sample output

The first column contains the name of the auth profile, while the second column contains the connection string.

Peek the right auth profile

Thepacx auth select command can be used to select which auth profile must be used from now on (until another pacx auth select changes your decision).

It accepts a single argument--name (-n) containing the name of the auth profile you want to set as default.

pacx auth select sample output

Other useful info

This namespace provides a few other useful commands:

  • pacx auth rename: can be used to rename an auth profile. It accepts 2 arguments:
    • --old (-o): the old name of the auth profile to rename
    • --new (-n): the new name of the auth profile
  • pacx auth delete: deletes a specific auth profile. It accepts a single argument:
    • --name (-n): the name of the auth profile to delete
  • pacx auth ping: tests the connection vs the current default auth profile. No argument required

You can simply typepacx auth in the console to get the list of available commands. Moreover, you can just type the name of a command followed by--help if you need help on that specific command arguments.

References

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Microsoft MVP 📐 Power Platform Architect 📐 | 👨🏻‍💻 Master Ninja Developer 👨🏻‍💻 | 🤖 Pro Code Avenger 🤖
  • Location
    Milano, Italia
  • Education
    Master Degree in Software Engineering @ Università di Bologna - Facoltà di Ingegneria
  • Pronouns
    He/Him
  • Work
    Dynamics 365 CE / Power Platform Senior Architect @ Avanade
  • Joined

More fromRiccardo Gregori

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp