If you’ve tried connecting a Copilot Studio agent to the Dynamics 365 Business Central MCP server and hit an OAuth failure mentioning a tenant isolation policy, you’re not alone. The error looks alarming, but the cause is simple: two different Microsoft tenants are involved, and one of them is blocking the connection.
The error
OAuth2Certificate authorization flow failed for service ‘First Party Azure Active Directory’. Sign-in with Azure Active Directory account @ failed, due to a tenant isolation policy for tenant . If your use case requires a cross-tenant connection, contact your tenant administrator. Details: Connection owner tenant: , Connection sign-in tenant: , Connector: Dynamics 365 Business Central
What the error is telling you
Two tenant IDs appear in the message, and they play different roles:
Term
Meaning
Connection owner tenant (Tenant A)
Where your Copilot Studio environment and the connection live
Connection sign-in tenant (Tenant B)
The tenant of the account you signed in with, which is where Business Central runs
If A and B differ, the connection is cross-tenant. Power Platform’s tenant isolation feature blocks cross-tenant connections when it’s enabled, and the error names the tenant whose policy blocked the sign-in.
Where to find the setting
Tenant isolation isn’t under Tenant settings in the Power Platform admin center, which is where most people look first. It lives under Security:
You’ll see a single toggle: Restrict cross-tenant connections. You need the Power Platform administrator or Global administrator role to view and change it.
The gotcha: check the right tenant
Here’s the detail that’s easy to miss. The toggle may be off in the tenant you’re looking at, and you’ll still get the error. The policy is enforced in the tenant named in the message, which isn’t always the one you’re signed in to as admin.
So:
Read the error and identify the tenant it names as enforcing the policy.
Have an admin of that tenant open Security → Identity and access → Tenant isolation.
Check each tenant involved. Isolation can be enabled on either side.
Three ways to fix it
1. Keep it in one tenant (simplest). Build the Copilot Studio agent in the same tenant as Business Central, using an account from that tenant. No cross-tenant connection means nothing to allow. For most organizations, this is the right answer.
2. Turn off isolation or add an exception. If the agent must live in a different tenant, an admin can switch Restrict cross-tenant connections off. If isolation must stay on, add the other tenant as an exception with the appropriate inbound and outbound rules. Do this in both tenants.
3. Use an account that belongs to the connection owner tenant. A guest account invited into the owning tenant, or a native account there with a Business Central license and permissions, avoids the cross-tenant sign-in.
After the change
Delete the failed connection in Copilot Studio (Connections page) and create it again so it picks up the updated policy. Policy changes can take a little time to propagate.
Confirm the signing-in user has a Business Central license and permissions in the target environment.
Confirm the MCP server is enabled in Business Central under MCP Server Configuration.
If isolation is off everywhere and the error persists, look at Microsoft Entra Cross-tenant access settings and any Conditional Access policies, which can block cross-tenant sign-ins independently.
Key takeaways
A “tenant isolation policy” error means the connection crosses tenants and one tenant is blocking it.
Tenant isolation is under Security → Identity and access, not Tenant settings.
The error names the tenant enforcing the policy. Check that tenant, not just the one you administer.
The cleanest fix is to avoid the cross-tenant connection altogether.
The single most strategically important news is MAI — a family of seven in-house models from Microsoft’s AI Superintelligence Team. The anchor, MAI-Thinking-1, is Microsoft’s first dedicated reasoning model: a mid-sized 35B active-parameter model with a 256K context window, trained from scratch on clean, commercially licensed data. Microsoft claims independent raters prefer it to Sonnet 4.6 in blind tests and that it matches Opus 4.6 on SWE Bench Pro coding. It’s in private preview on Foundry.
The rest of the family fills out the stack: MAI-Code-1 (a coding model tuned for GitHub, already live in Copilot and VS Code), MAI-Image-2.5 (text-to-image and image-to-image, now in PowerPoint and rolling out to OneDrive), MAI-Transcribe-1.5 (speech-to-text across 43 languages), and MAI-Voice-2 (15+ additional languages).
Why it matters: Owning the model layer changes Microsoft’s margin structure and reduces single-vendor dependency. For enterprises, the “clean, commercially licensed training data” claim is the real selling point — it directly addresses the IP-contamination risk that has made legal teams nervous about generative AI in production.
The dependency to watch: These are still early. MAI-Thinking-1 is private preview only, and vendor-published benchmarks always deserve independent verification before you architect around them. Treat MAI as a promising second source, not a drop-in replacement, until third-party evals land.
Microsoft framed agents as a new form factor, and the clearest example is Microsoft Scout, a personal work agent now rolling out to Frontier customers. Built on “OpenClaw” and Work IQ, Scout runs on your desktop, uses tools you already live in (Teams, Outlook), and proactively handles meeting prep, scheduling conflicts, and routine tasks. It reads and writes files, runs shell commands, automates browsers, and works autonomously in the background — all under a granular permission system that requires approval before sensitive actions.
Alongside it, the GitHub Copilot desktop app (preview) brings agentic development to a native experience, letting you orchestrate multiple agent sessions in parallel with git worktrees keeping work isolated.
Why it matters: This is the shift from “AI in a chat box” to “AI with hands.” The automation potential is real — an agent that preps your meetings and clears scheduling conflicts recovers genuine hours.
The risk to call out plainly: An autonomous agent with filesystem, shell, and M365 access is a meaningful attack surface and a governance challenge. The permission model is the entire safety story here. Don’t roll these out broadly without mapping which directories, commands, and data scopes are auto approved. Scout is preview/Frontier-gated for a reason.
This blog shows to use error messages in different ways possible.
If you’re developing App for AppSource and want to give more detailed error message plus advanced capabilities to solve the error by end-users on their own.
Use Cases with examples:
1. ErrorInfo.Create (not a data type but as a direct function)-
When used with Error() do not make any difference and will show below error.
local procedure InitializeClientError()
var
InitializeErrorInfo: ErrorInfo;
ErrorTitleLbl: Label 'Initializing error.';
UpdateLbl: Label 'Make Update';
begin
InitializeErrorInfo.DataClassification(DataClassification::SystemMetadata);
InitializeErrorInfo.ErrorType(ErrorType::Client);
InitializeErrorInfo.Verbosity(Verbosity::Error);
InitializeErrorInfo.Message(InitialMsg);
InitializeErrorInfo.Title(ErrorTitleLbl);
InitializeErrorInfo.AddAction(UpdateLbl, Codeunit::"Update MNK", 'UpdateOnCustomer');
Error(InitializeErrorInfo);
end;
codeunit 50100 "Update MNK"
{
trigger OnRun()
begin
end;
procedure UpdateOnCustomer(ErrorInfo: ErrorInfo)
var
SomeProcessesLbl: Label 'Some process or data updates here.';
begin
Message(SomeProcessesLbl);
end;
}
Output:
6. ErrorInfo (with Navigation)-
Purpose: To show some error message with a navigation, action and title.
It was hard to insert item tracking lines for item journals as they are saved in different table. Plus going to each journal lines and then inserting a lot/serial is a huge manual task.
Before Enabling:
The user needs to click on Item Tracking Lines and then enter Lot/Serial for that item (which needs to be done for all items if list is huge):
Solution:
On journal batches, enable the setup as shown in below snapshot.
After Enabling:
Four fields (highlighted below) would be shown on Item Journals Line (you must have seen them in Item Reclassification Journals).
Entering the data or uploading the data here allows to create a Item Tracking Lines in background.
This helps in uploading opening inventories in easier manner for items with lots / serials.
Same feature is available on Warehouse physical journal. Give it a try!!
Users by default are allowed to access the data of Microsoft Dynamics Business Central (BC) which they can view the table or check the values which we some installations may not need.
Before Changes:
Users can access the said details either by pressing the [Ctrl] + [Alt] + [F1] on their keyboard or by going to ‘Help and Support’ -> ‘Inspect Pages and Data’
The screen looks something like shown below:
Solution:
Create a new Permission Set in BC as shown below:1
Type
Object Type
Object ID
Object Name
Exclude
System
1350
Run Table
Exclude
System
5330
Tools, Zoom
Permissions under new Permission Set create.
Assign the permissions to the users and ask them to re-login in BC.
After Changes:
Now ask users to re-login to BC and they will not see the data under Page Inspection. The screen would look like below:
You are accessing old BC Container and you suddenly get technical issue error. You check event logs of Container, and you get below errors / no error.
The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
Default PowerBI report and dashboard shows values of default or select fields when you hover your mouse over.
You need to show a different ToolTips page.
Solutions:
Create a page and change its Canvas settings. Here change Type to ToolTips
If you see above, I have created a KPI page which picks data from Measure.
Tick ‘Allow use as tooltip’ on Page Information of that page.
Select a visualization where you need customized tooltip to show. Go to General tab and select ToolTips to enable it. Under Type choose ‘Report page’ and select page of tooltip created with above listed steps 1 and 2:
This part 1 blog is to give small idea, hint or knowledge on how you can use PowerApp Gateway Agents with Microsoft Dynamics Business Central and what are the purposes / use case of using it. Part 2 is already available to publish, but it was personal idea of providing the introduction first on what you’re doing before its practical working.
Pre-requisites:
Microsoft Dynamics Business Central (knowledge and access)
On-Premises Data Gateway (configured and installed)
If you have Docker Container of Microsoft Dynamics Business Central (BC) and developing an App or PTE integrating with external sources (external APIs endpoints) – And facing error ‘The remote name could not be resolved’.
New BC developers or learners usually find it difficult to understand how their code development or customization are performing. Any logic in AL Code can be achieved but these new application logics (or codes) can be performance impacting. How to test or trace them?
Applicable to: Business Central (application version 4.0 or above)
Solutions:
There is a performance toolkit provided by BC on its setup. Such toolkit uses a new datatype introduced from application version 4.0. Datatype is SessionInformation.
Details about sessioninformation on Microsoft’s portal
Now, coming to datatype’s details. There are two methods provided (I reckon there should be more methods in future and then dev team don’t need to check more details on SQL Profilers or monitor on SQL on SaaS.
Methods:
SqlStatementsExecuted – This is number of SQL statements that were executed during the sessions. Good! Now we now why certain users are in trouble or getting locks when they are testing new functionality in BC. You can track it by putting these details in Telemetry on your apps or use Microsoft BC’s Performance Toolkit.
SqlRowsRead – Similar to above method, this method returns SQL rows read from starting of session.
If you are experienced person, you would / should have one question:
I see the same details during debugging, why use this datatype?
Although, while writing this blog, I also understand that you would avoid debugging on customer’s environment where there are real time data and process occurring.
Above SQL statistics can be also seen while debugging. This is during development phase of project, although you may not have guarantee when real business data comes on your Apps.
Examples:
There are good, self-explanatory on Microsoft’s portal and its usage is already in BC Performance Toolkit. Although, still the developers who need to use this below are some examples:
var
SqlRowsRead := BigText;
begin
SqlRowsRead := SessionInformation.SqlRowsRead();
Message(Format(SqlRowsRead));
end;
var
SqlStatementsExecuted : BigText;
begin
SqlStatementsExecuted := SessionInformation.SqlStatementsExecuted();
Message(Format(SqlStatementsExecuted));
end;
Real time usage in BC, is Microsoft Business Central Performance Toolkit. You can check on codeunit 'BCPT Line' which has major codes based on this datatype.
Microsoft Dynamics Business Central 2021 Wave 1 (Inventory Setup)Assisted Setup (New)
Assisted Setup:
Post Inventory Cost to G/L: On enabling this field, ERP creates a job queue entry that will post costs for all items at a specified time. The default will be 2 AM, but you can change that. Suggested to schedule it during non-working hours.
Adjust Cost – Item Entries: On enabling this field, ERP creates a job queue entry that will adjust costs for all items at a specified time. The default will be 1 AM, but you can change that.
After enabling any or all feature from previous screenJob-queue entries after the feature is run
Pros:
Ease the enabling of job-queue for those who are not expert on tool, who doesn’t know which object to schedule.
If job-queue is already enabled/available, system does not keep on popping the assisted setup.
Cons or suggestions:
Many job-queues scheduled at same time may cause problems. Hence, avoid scheduling the strong processes job-queues at same time. Adjustment of costs and posting inventory cost to G/L are the strong processes.
Microsoft Dynamics Business Central Wave 1, 2021 included item availability by lot after approximately 90 votes on this idea. We will go through the functionality introduced, how it was done, pros and cons of module.
What’s New:
Microsoft Business Central Wave 1 2021 Microsoft Business Central Wave 2 2020
How:
New buffer table ‘Availability Info. Buffer’, a matrix page and couple of queries to retrieve Lot from item ledgers and reservation entries.
Pros:
Easily lists serial/lot number of items to determine the expiration, inventory, availability, requirements on single page.
Cons or Suggestions:
Includes items with no item tracking codes on Item No filter (that can be considered).
You are working with a team. Team members need to make the changes on Wiki in Azure DevOps. However, the button is non-editable and you have tried to check on Wiki Security and Permissions.
Edit button is disabled/enabled for organizational users.
In Dynamics NAV/Business Central (here after called as ERP), there are chances where customer needs to store huge texts in formatted text. The direction (I think) to do this is by saving such formatted texts in BLOB fields.
Now the challenge comes is when ERP users have provided the data to you in Excel or XML file format. And later it needs to be migrated to ERP. I was not able to achieve this using Configuration packages, Excel import or simple XMLPort import with logic to write in BLOB field.Read More »
Trip planning used to mean a dozen tabs and a messy notes file. Now I give Muse the constraints once:
“Weekend in Johor, Malaysia in Oct and Nov, two adults and one baby, under S$1,200 total. Morning bus, a hotel near the JCA Oval Cricket Ground, and a day plan that isn’t rushed.”
Muse pulls options from travel apps like Agoda, Klook and Trip.com. It checks my Calendar for clashes and drafts an itinerary. It also reminds me about passport validity and visa rules. I make the final booking decisions. Muse does the comparing, and I confirm the purchase.
2. A day of cricket
Singapore has a busy cricket scene, and match days involve a lot of logistics (specially when it’s a different country’s game. For a Saturday at the ground, I ask:
“Match starts 9am at the JCA Oval, Johor, Malaysia. Plan my morning: Cricket team van pickup time, remind me to pack kit and sunscreen, and message the team that I’m 15 minutes early.”
Muse works back from the start time to a pickup time. It adds the reminders to my Calendar and drafts the WhatsApp or email note for me to approve. When I’m watching a big international match instead, it blocks the time and reminds me to book the late-night ride home.
3. Cutting bills and unused subscriptions
This is where it earns its keep. I ask:
“Go through my Gmail receipts from the last six months. List every subscription and bill, flag anything I haven’t used in 60 days, and tell me what I’d save by cancelling.”
A typical result:
Item
Monthly cost
Verdict
Streaming service I forgot about
S$15
Cancel
Cloud storage upgrade
S$3
Downgrade
Gym app
S$30
Cancel; I go twice a month
Telco plan
S$55
Compare plans, since I use under half the data
That’s about S$48 a month, or roughly S$575 a year. Muse also drafts the cancellation emails, and I only hit send once I’ve read them. For everyday shopping, it compares prices across Shopee and Lazada and reminds me to check ShopBack for cashback.
Things to keep in mind
Check before you confirm. Read each draft email and each purchase total, since Muse asks for your approval on exactly those.
Mind the permissions. Muse needs access to Gmail and Calendar, so connect only what you’re comfortable sharing.
Muse hasn’t changed what I do. It has taken over the admin around it: the planning, the reminders and the bill audit. I’d start with the subscription audit, because it pays for itself fastest.
From install to real projects: a Canvas Expense app + a job-queue failure notifier — built with pac and Claude Code.
Part 1 was about getting PAC CLI. Part 2 is about using it — with an AI pair-programmer in the terminal. Two practical, end-to-end examples you can adapt to your own work.
👋 Why I’m Sharing This (Note to My Network)
In Part 1 I showed my network how to install the Power Platform CLI (pac) in a few minutes. The most common reply I got was:
“Okay, it’s installed… now what can I actually do with it?”
Fair question. pac really shines when it turns clicks into code — repeatable, source-controlled, CI/CD-friendly automation. So in this part I’m walking through two realistic scenarios that mirror day-to-day Power Platform work — and I’m pairing each one with Claude Code, an agentic coding assistant that lives in your terminal, to generate the JSON, Power Fx, and scripts that pac then ships:
🧾 A Canvas Power App for Expense Management — generated from a custom connector and treated as source code.
🔔 A Power Automate flow that notifies Teams + email when a job queue item fails — built in the designer, shipped with ALM, then monitored from the CLI.
Who this is for: the same crowd as Part 1 — Power Platform devs, ALM/DevOps engineers, admins, and makers ready to move past the portal.
My intent? To show that pac isn’t just an installer — it’s the command line for the whole Power Platform lifecycle — and that an AI coding assistant makes driving it dramatically faster. Let’s get into it.
The Mental Model: pac + Claude Code Across the Lifecycle
Now imagine a teammate who can write the artifacts at every stage and run the pac commands for you. That’s Claude Code. I like to think of it this way:
🧠 You own the intent and the decisions (“expenses get approved by managers”).
🤖 Claude Code authors the files (OpenAPI, Power Fx, JSON, scripts) and executes the CLI.
⚙️ PAC CLI is the engine that actually talks to Power Platform.
Keep that trio in mind — both examples below are just two different paths through it.
💡 First move in any repo: create a CLAUDE.md file so Claude Code has project context. Mine looks like this:
# ExpenseHub — Power Platform project
- Uses Power Platform CLI (`pac`) for all ALM.
- Solutions live in ./src, build output in ./out.
- Publisher prefix: con. Preferred language: Power Fx.
- Never commit secrets; use environment variables / settings files.
From then on, every prompt is grounded in your conventions.
Example 1 🧾 — A Canvas Power App for Expense Management
Scenario: Field employees submit expenses through a Canvas app; the app talks to an expense backend through a custom connector; approvers review submissions. We’ll scaffold the app from the connector and make it source-controlled — with Claude Code writing the connector and the Power Fx.
Step 1 — Authenticate and confirm your environment
🤖 Claude Code prompt:“Run pac auth create, then pac env who, and summarize which environment we’re connected to and the org URL.”
It runs the commands and reports back — you stay in the loop.
Step 2 — Create the custom connector for the expense API
pac connector scaffolds the files and registers the connector in Dataverse. But a custom connector needs a real OpenAPI definition — this is where Claude Code earns its keep:
# Let Claude Code scaffold the connector files
🤖 Claude Code prompt:“Create a custom connector for an Expense API. Scaffold ./ExpenseApi/apiDefinition.swagger.json (OpenAPI 2.0) with three operations — GetExpenses, SubmitExpense, ApproveExpense — plus apiProperties.json using an API-key connection template, and a README describing the endpoints. Use contoso as the host placeholder.”
Claude Code writes the files, then runs:
# Register the connector into Dataverse and a solution
⚠️ Claude Code will draft the OpenAPI spec, but you must verify it matches your real API contract (auth, paths, schemas). Treat the AI output as a strong first pass, not gospel.
Step 3 — Generate the Canvas app from the connector
This is the magic bit — pac canvas create generates an .msapp wired to your connector:
paccanvascreate`
--msapp./ExpenseApp.msapp`
--connector-display-name"Expense Management API"`
--environmenthttps://contoso-dev.crm.dynamics.com
Step 4 — Unpack the app into source code (source control time)
An .msapp is an opaque binary — hard to diff. Unpack it into clean Power Fx / YAML sources and commit it to git:
paccanvasunpack`
--msapp./ExpenseApp.msapp`
--sources./ExpenseApp-src`
--layoutSourceCode`
--overwrite
Now the fun part — author the screens as code, with Claude Code doing the heavy lifting.
🤖 Claude Code prompt:“In ./ExpenseApp-src, add three screens as Power Fx / .pa.yaml: (1) a MyExpenses screen with a gallery bound to GetExpenses, (2) a NewExpense screen with a form validating amount > 0 and a submit button calling SubmitExpense, and (3) an Approvals screen for managers that calls ApproveExpense. Follow the existing source layout and naming conventions.”
Because the app is unpacked, Claude Code can reason over the real files, match your existing controls, and produce reviewable diffs you can approve line by line. 🎉
Step 5 — Repack the sources back into an app
paccanvaspack`
--sources./ExpenseApp-src`
--msapp./ExpenseApp.msapp`
--layoutSourceCode`
--overwrite
🤖 Claude Code prompt:“Pack the sources and, if the pack fails, read the error and fix the offending Power Fx file, then repack.” — a tight build-fix loop without you hand-editing YAML.
Step 6 — Ship it with a solution (ALM)
Wrap the connector + app in a Dataverse solution, then export/import it between environments. Let Claude Code generate the whole bootstrap script:
🤖 Claude Code prompt:“Write scripts/deploy-expense-app.ps1 that: inits the ExpenseHub solution (publisher Contoso, prefix con), adds the connector (component type 371) and the canvas app (component type 300), exports it managed to ./out, and imports it with --publish-changes.”
# The script Claude Code generates will run these commands:
💡 Bonus: need to pull an app that already exists? Use pac canvas list to find it and pac canvas download --name "ExpenseApp" to save the .msapp locally — Claude Code can chain both and unpack in one go.
Why this matters: your Expense app is now generated, source-controlled, and deployable by a pipeline — not trapped in a portal. Claude Code wrote the connector, the Power Fx, and the deploy script; you reviewed and shipped it. ✅
Example 2 🔔 — Notify Teams + Email When a Job Queue Item Fails
Scenario: When a background job (a Dataverse System Job / async operation, or a row in a custom Job Queue table) fails, we want an instant heads-up in Microsoft Teams and an email to the support inbox — so failures don’t sit silently.
⚠️ An important honesty note
The pac CLI does not author Power Automate flows for you — flows are still built in the Power Automate designer. Claude Code can’t click the designer either. But together they cover almost everything around the flow: generating the FetchXML, the connection-reference settings, the notifications copy, the deploy scripts, and the monitoring queries. (The pac power-automate commands are admin inspection commands, currently in Preview.)
So the realistic pattern is: design once → ALM with pac → monitor with pac / Claude Code.
Step 1 — Build the flow in the designer
Create a cloud flow with:
Trigger: Dataverse → When a row is added, modified or deleted, on the System Jobs (Async Operation) table — or on a custom Job Queue table — filtered to failures (statuscode eq 31 / Status = Failed).
Action 1 (Teams):Post message in a chat or channel to your #alerts channel with the job name, error, and a link to the run.
Action 2 (Email):Send an email (V2) (Outlook) to the support mailbox with the same details.
🤖 Claude Code prompt (before you build):“Draft the trigger filter and the Teams + email message templates for a flow that fires when a job queue item fails. Include the job name, error message, queued-on time, and a deep link to the run. Give me the exact FetchXML / OData filter expression to paste into the trigger.”
You still assemble the flow in the designer — but you walk in with the filter and the copy already written.
Step 2 — Put the flow in a solution and add it via pac
# Add the cloud flow to the solution (component type 29 = Workflow/cloud flow)
🤖 Claude Code prompt:“Unpack the solution, then create a .gitignore and a short README.md that explains the folder structure and lists the connection references the flow needs.”
Step 4 — Deploy the flow to another environment
Connection references and environment variables usually need to be filled per environment. Let Claude Code generate that settings file for you:
🤖 Claude Code prompt:“Read the unpacked solution and produce a deployment settings JSON with the connection references (Dataverse, Teams, Outlook) and environment variables the flow uses.”
pacsolutionimport`
--path./out/ExpenseHub.zip`
--activate-plugins`
--publish-changes`
--settings-file./out/deployment-settings.json
--activate-plugins turns the flow on after import, --publish-changes publishes customizations immediately, and --settings-file wires up the connection references Claude Code just generated.
Step 5 — Monitor failures from the CLI 🕵️
Once it’s live, inspect the flow and its run history without opening the portal:
🤖 Claude Code prompt:“Write scripts/failed-jobs.ps1 that runs pac env fetch for failed system jobs, parses the JSON, and prints a summary table of job name, error, and age.”
Now instead of scrolling the portal, you get a tidy table in your terminal — generated, reusable, and diffable. 📊
Why this matters: the notification flow is now versioned, promotable, and observable — and the same CLI that deployed it is the one you use to watch it. That’s a full lifecycle story. ✅
🧠 Claude Code Tips for Power Platform Work
A few habits that made the biggest difference for me:
📄 Keep a CLAUDE.md with your publisher prefix, solution names, folder layout, and “never commit secrets” rule. It grounds every prompt.
🔁 Let it run pac and read the errors. Clipboard-pasting build failures is where humans slow down; Claude Code closes that loop itself.
🧪 Always review Power Fx and OpenAPI output. It’s a fast first draft, not a substitute for knowing your domain.
🧩 Small, scoped prompts win. “Add a gallery bound to GetExpenses that filters by the current user” beats “build my app.”
🔐 Never give it secrets. Use settings files and environment variables, and add .env / *.json with credentials to .gitignore.
🎯 What Both Examples Prove
Both walkthroughs are the same loop, just different stations — and Claude Code is present at nearly all of them:
Lifecycle stage
Expense Canvas app
Job-queue notifier
Build
pac connector + pac canvas create (+ Claude Code writes OpenAPI & Power Fx)
Flow designer (+ Claude Code drafts filter & message copy)
🤖 Claude Code is the glue: it writes the OpenAPI spec, the Power Fx screens, the deployment settings, and the monitoring scripts — then runs every pac command above for you.
A beginner-friendly, from install to first commands.
👋 Why I’m Writing This (Note to My Network)
Power Platform work is moving fast from clicks to code and automation – and the one tool that keeps showing up in every serious ALM, DevOps, and pro-dev conversation is the Power Platform CLI (pac).
My intent with this post is simple: I want to give my LinkedIn community – Power Platform developers, ALM/DevOps engineers, admins, and anyone curious about moving beyond the maker portal – a clear, no-guesswork starting point. When I was getting started, the docs were great but scattered, and I wasted time on small gotchas (like pac --version not existing anymore). This write-up removes that friction.
Who this is for:
🚀 New/aspiring Power Platform developers who want a real developer setup
🛠️ Admins & makers ready to script repeatable tasks instead of clicking
⚙️ ALM / DevOps folks building CI/CD pipelines for solutions
📚 Anyone who wants a bookmarkable “install pac in 5 minutes” reference
What you’ll get: a working install, a verified setup, and a handful of first commands so you can do something useful the same day.
If this helps you, feel free to share it with your network. Now, let’s build. 💪
What is PAC CLI?
The Power Platform CLI (pac) is a cross-platform command-line tool that lets you work with Power Platform environments right from your terminal. Think of it as the developer-focused companion to the Power Platform admin center and the maker portal – and the engine behind most modern ALM and automation workflows.
With pac you can:
🔐 Connect and authenticate to environments (pac auth)
📦 Create, export, import, and manage Dataverse solutions (pac solution)
🧩 Build and deploy PCF controls (pac pcf)
🌐 Manage Power Pages sites (pac pages)
🔁 Work with Power Automate, Copilot Studio, and Dataverse plug-ins
🏢 Administer environments, licensing, and governance (pac admin, pac env)
🤖 Bootstrap ALM pipelines (pac pipeline)
It works great interactively and inside CI/CD pipelines (Azure DevOps, GitHub Actions, and more).
Before You Start (Prerequisites)
✅ Windows 10/11 (macOS and Linux also work)
✅ The .NET SDK installed. This walkthrough used .NET SDK 9 and 10. PAC CLI 2.x targets .NET 8+, so a matching runtime is required.
💡 Quick tip: Not sure what you have? Check with:
dotnet--list-sdks
dotnet--list-runtimes
Which Install Method Should You Use?
There are two common ways to install PAC CLI on Windows. Here’s the honest comparison:
Method
Best for
Admin needed?
Future updates
.NET global tool ⭐
Devs who already have the .NET SDK
No
One command: dotnet tool update
MSI installer
Machines without the .NET SDK
Yes
Manual reinstall
⚠️ There is currently no winget package for PAC CLI, so the two options above are the ones to use.
This guide uses the .NET global tool — it’s the cleanest option when the .NET SDK is already present, needs no admin rights, and updates in one command.
You can invoke the tool using the following command: pac
Tool 'microsoft.powerapps.cli.tool' (version '2.13.1') was successfully installed.
📁 The tool lands in %USERPROFILE%\.dotnet\tools, which the .NET SDK adds to your user PATH automatically. No fiddling required.
Step 2 — Verify the Installation
Open a new terminal (so the updated PATH is picked up) and run:
pachelp
At the top you’ll see the version banner, for example:
Microsoft PowerPlatform CLI
Version: 2.13.1+g251dee1 (.NET 10.0.8)
Want to confirm the command is discoverable? Try:
Get-Commandpac
📝 Heads-up (the gotcha I promised to save you): In current versions the version banner is printed by pac help. The classic pac --version flag may report “Not a valid command” — so use pac help instead.
Still not recognized? Add the tools folder to your PATH manually, then reopen the terminal:
You’ll find command groups like admin, auth, solution, pcf, pages, plugin, pipeline, copilot, and many more. Don’t feel overwhelmed — you’ll use a handful of these 90% of the time.
Step 4 — Authenticate to an Environment
This is the first real step — connect to your environment:
Run it and pac is added machine-wide. Just remember: updates require running a newer MSI, which is why the .NET tool is usually the nicer path for developers.
🎯 Summary
In just a few minutes you went from zero to a fully working PAC CLI:
Installed it → dotnet tool install --global Microsoft.PowerApps.CLI.Tool
Verified it → pac help
Authenticated → pac auth create
Started managing solutions and environments from the terminal
From here, PAC CLI becomes the backbone of automated Power Platform ALM. Wire these same commands into Azure DevOps or GitHub Actions, and you can build, test, and deploy solutions with the exact commands you just ran by hand. 🚀
A Small Ask 🙏
If this helped you, drop a comment with the first thing you automated with pac — I’d love to hear how others in the community are using it. And if you think someone in your network is starting their Power Platform journey, share this post with them. Let’s grow the community together. 🤝