<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-connect-to-microsoft-dataverse-using-power-platform-cli-gmtgehj54" -->

---
title: How to Connect to Microsoft Dataverse Using Power...
description: This is a step-by-step guide to authenticating with Microsoft Dataverse using the Power Platform CLI (PAC CLI). It shows how to run 'pac auth create' to make a...
canonical: https://daily.dev/posts/how-to-connect-to-microsoft-dataverse-using-power-platform-cli-gmtgehj54
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Connect to Microsoft Dataverse Using Power Platform CLI | daily.dev
og:description: This is a step-by-step guide to authenticating with Microsoft Dataverse using the Power Platform CLI (PAC CLI). It shows how to run 'pac auth create' to make a...
og:url: https://daily.dev/posts/how-to-connect-to-microsoft-dataverse-using-power-platform-cli-gmtgehj54
og:image: https://api.daily.dev/og/posts/GMTGEhJ54.png
og:image:alt: How to Connect to Microsoft Dataverse Using Power Platform CLI
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Connect to Microsoft Dataverse Using Power Platform CLI

**[C\# Corner](https://daily.dev/sources/csharpcorner)** · 4 min read · 1 upvotes · 0 comments

## Summary

This is a step-by-step guide to authenticating with Microsoft Dataverse using the Power Platform CLI (PAC CLI). It shows how to run 'pac auth create' to make a basic authentication profile, then target a specific environment with 'pac auth create --environment "Arun-Dev"' or by URL using 'pac auth create -u https://contoso-org.crm.dynamics.com'. You can list all profiles with 'pac auth list', which marks the active one with an asterisk, and switch profiles using 'pac auth select --index 3'. The guide covers creating separate profiles for Development, Test, and UAT environments.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.c-sharpcorner.com/article/how-to-connect-to-microsoft-dataverse-using-power-platform-cli>

## Questions this post answers

### How do I connect Power Platform CLI to a specific Dataverse environment?

Run 'pac auth create --environment "EnvironmentName"' where EnvironmentName can be an environment ID, environment URL, unique name, or partial name. Alternatively, authenticate directly by URL with 'pac auth create -u https://yourorg.crm.dynamics.com'. This creates an authentication profile tied to that environment and prompts you to sign in.

_Developers juggling dev, test and UAT environments can keep PAC CLI workflows handy on daily.dev._

### How do I switch between multiple PAC CLI authentication profiles?

List existing profiles with 'pac auth list', which marks the active profile with an asterisk and shows each profile's index. Then run 'pac auth select --index 3' (replacing 3 with the desired profile's index) to activate that profile. Running 'pac auth list' again confirms which profile is now active.

_Teams managing several Dataverse environments can track CLI auth workflows like this on daily.dev._

## Similar posts on daily.dev

- [Dataverse Plugin Is Now on the Claude Marketplace](https://daily.dev/posts/dataverse-plugin-is-now-on-the-claude-marketplace-sanrx5d5m) · DevBlogs · 7 upvotes · 0 comments
- [How to configure password reset in Power Pages using Power Automate](https://daily.dev/posts/how-to-configure-password-reset-in-power-pages-using-power-automate-i0jarkklf) · C\# Corner · 0 upvotes · 0 comments
- [Building an end-to-end monitoring solution with Azure Arc, Log Analytics and Workbooks–Part 2: Data collection with Azure Arc](https://daily.dev/posts/building-an-end-to-end-monitoring-solution-with-azure-arc-log-analytics-and-workbooks-part-2-data--qir9515lk) · The Art of Simplicity · 1 upvotes · 0 comments

---

Tags: [#authentication](https://daily.dev/tags/authentication), [#cli](https://daily.dev/tags/cli)

[View this post on daily.dev](https://daily.dev/posts/how-to-connect-to-microsoft-dataverse-using-power-platform-cli-gmtgehj54)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Connect to Microsoft Dataverse Using Power Platform CLI","url":"https://daily.dev/posts/how-to-connect-to-microsoft-dataverse-using-power-platform-cli-gmtgehj54","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-connect-to-microsoft-dataverse-using-power-platform-cli-gmtgehj54"},"datePublished":"2026-10-28T07:59:30.383Z","dateModified":"2026-10-28T08:13:19.138Z","description":"This is a step-by-step guide to authenticating with Microsoft Dataverse using the Power Platform CLI (PAC CLI). It shows how to run 'pac auth create' to make a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3c659bb730ddfc04561690d55aa9ad9c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3c659bb730ddfc04561690d55aa9ad9c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"C# Corner","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"C# Corner","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ada2d584df6241748fc4e71878dc70a3","url":"https://daily.dev/sources/csharpcorner"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-connect-to-microsoft-dataverse-using-power-platform-cli-gmtgehj54","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"authentication,cli","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"C# Corner","item":"https://daily.dev/sources/csharpcorner"},{"@type":"ListItem","position":3,"name":"How to Connect to Microsoft Dataverse Using Power Platform CLI"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-connect-to-microsoft-dataverse-using-power-platform-cli-gmtgehj54#faq","mainEntity":[{"@type":"Question","name":"How do I connect Power Platform CLI to a specific Dataverse environment?","acceptedAnswer":{"@type":"Answer","text":"Run 'pac auth create --environment \"EnvironmentName\"' where EnvironmentName can be an environment ID, environment URL, unique name, or partial name. Alternatively, authenticate directly by URL with 'pac auth create -u https://yourorg.crm.dynamics.com'. This creates an authentication profile tied to that environment and prompts you to sign in. Developers juggling dev, test and UAT environments can keep PAC CLI workflows handy on daily.dev."}},{"@type":"Question","name":"How do I switch between multiple PAC CLI authentication profiles?","acceptedAnswer":{"@type":"Answer","text":"List existing profiles with 'pac auth list', which marks the active profile with an asterisk and shows each profile's index. Then run 'pac auth select --index 3' (replacing 3 with the desired profile's index) to activate that profile. Running 'pac auth list' again confirms which profile is now active. Teams managing several Dataverse environments can track CLI auth workflows like this on daily.dev."}}]}
```

