Power BI on a Mac: the whole workflow except one window
Yes, you can do Power BI work on a Mac. The model and report are text, a Python script publishes them with your Microsoft sign-in, and you check the result in the browser. Desktop stays Windows, for visual design only.
Yes. The model and the report are text files, you edit them on the Mac, a script publishes them to the Fabric workspace with your Microsoft sign-in, and you check the result in the browser. Power BI Desktop stays Windows only, and you need it for one thing: visual design.
We run every client engagement this way. Over 70% of the week happens on the Mac. The rest is design, on a Windows machine, once in a while.
The series
Three short videos, one playlist. Each answers one question.
| # | Video | Question |
|---|---|---|
| 1 | The answer | Can I do Power BI work on a Mac? |
| 2 | The publish | How do I publish Power BI from a Mac? |
| 3 | The 70% | What can I do in Power BI without Desktop? |
All three are on this page.
Why this question has a bad answer everywhere
- Search “Power BI on a Mac” and the answer is “no, Desktop is Windows only”. True, and it stops people there.
- The workarounds on offer are a virtual machine or a cloud Windows desktop for everything. Slow, and you still click Publish by hand.
- Nobody says what Desktop is actually needed for, so people assume it is everything.
It is not everything. Since Power BI Projects, the model and the report are text, and Microsoft publishes a Python library that puts them in a workspace. Desktop is the design surface. The rest is files, a script, and the browser.
Can I do Power BI work on a Mac?
Yes. Here is how the pieces fit:
| Piece | What it is | On the Mac |
|---|---|---|
| The model | TMDL text files in a Power BI Project folder | any editor, or an AI agent |
| The report | JSON files in the same folder | any editor, or an AI agent |
| Version control | Git, GitHub or Azure DevOps | yes, see Git is step 0 |
| Publish | fabric-cicd, Microsoft’s Python library | yes, a script |
| Refresh | one call to the Power BI REST API | yes, a script |
| Check, schedule, app, lineage | the Fabric portal | the browser |
| Visual design | Power BI Desktop | no, Windows only |
Safe by construction: the publish script signs in as you with your Microsoft account, in your tenant, with your permissions. Nothing leaves your account, there is no third-party service in the middle.
On video, split screen, the agent on the left and the browser on the right: ask for the margin measure, then ask for it as a percent, then the diff. Every command the agent runs is on screen, one step at a time. The browser still shows the old format. That is the whole edit. The next video publishes it, in the same chat.
This is a new way to develop Power BI: text, an agent, publish from code. We use one agent for all of it. Any agent that runs commands works, and the scripts work with no agent at all. The logic lives in the script. The agent is the hands.
How do I publish Power BI from a Mac?
With fabric-cicd. It reads the Power BI Project folder, signs in as you, and creates or updates the semantic model and the report in the workspace through the Fabric REST API. It holds the report and model ids, so links, embeds and the app keep working after every publish.
How the tech works, in four lines:
pip install fabric-cicd azure-identityon macOS Python. No Windows dependency.- Sign in once per machine: a Microsoft device code, approved in the browser. The token is cached, later runs are silent.
- The script names a folder and a workspace id. fabric-cicd walks the folder, finds the
.SemanticModeland.Reportitems, and publishes each one. New item: create. Existing item: update in place. - After publish, one REST call starts the refresh. Typical refresh on our models: 0.5 to 3.5 minutes.
The script, minus the client specifics:
from pathlib import Path
from azure.identity import DeviceCodeCredential
from fabric_cicd import FabricWorkspace, publish_all_items
WORKSPACE = "<workspace id from the portal url>"
REPO = Path(__file__).resolve().parent / "reports" # the folder holding the .pbip projects
cred = DeviceCodeCredential() # Microsoft sign-in, your account, cached after the first run
fw = FabricWorkspace(
workspace_id=WORKSPACE,
repository_directory=str(REPO),
item_type_in_scope=["SemanticModel", "Report"],
token_credential=cred,
)
publish_all_items(fw) # create or update, ids held
Refresh, after the publish:
import requests
token = cred.get_token("https://analysis.windows.net/powerbi/api/.default").token
requests.post(
f"https://api.powerbi.com/v1.0/myorg/groups/{WORKSPACE}/datasets/{MODEL_ID}/refreshes",
headers={"Authorization": f"Bearer {token}"},
json={"notifyOption": "NoNotification"},
)
One script per client, parameters for the report and the target workspace. An agent calls the same script. So do you.
Paste this into your AI coding agent to get the two scripts for your own workspace:
Write publish.py and refresh.py for the Power BI Project folder in this repo.
publish.py: use fabric-cicd with azure-identity DeviceCodeCredential. Take the workspace id and an optional report name as arguments. Publish SemanticModel and Report items in place with publish_all_items. Print each item name and whether it was created or updated.
refresh.py: take the workspace id and the semantic model name, look up the dataset id through the Power BI REST API, start a refresh with notifyOption NoNotification, then poll the refresh history every 20 seconds until it reports Completed or Failed, and print the result.
No secrets in the files. The sign-in is the Microsoft device code flow, cached by azure-identity.
What can I do in Power BI without Desktop?
Over 70% of our week. In the browser, with a script, or through an agent:
| Task | Where |
|---|---|
| Edit a measure, a column, a relationship, a format | text editor or agent, on the Mac |
| Edit a visual’s field bindings, a page name, a filter | text editor or agent, in the report JSON |
| Publish and refresh | the scripts above |
| Check a number against the source | the report in the browser, the source query beside it |
| Scheduled refresh, gateway binding, credentials | workspace settings in the portal |
| Update the app, audiences | the portal |
| See what feeds what | lineage view in the portal |
| Review and merge a change | the pull request in the browser |
On video, 30 seconds in the browser: a refresh schedule, an app update, lineage view, one number checked against the source. Then 20 seconds with the agent: “add average price and publish it”. One ask, it edits the model, runs the publish script, starts the refresh, and the report shows the measure.
The one window
Visual design is better in Power BI Desktop. Dragging a visual, sizing it, picking a theme, trying a layout: that stays on Desktop, and on a Mac that means a Windows machine over remote desktop, or a virtual machine. We open it for design, once in a while, not every day.
The repository is the bridge. Pull on the Windows machine, design, save, push. Back on the Mac, pull, and the diff shows exactly what the design session changed.
Result
Our own engagements, every publish from a Mac:
| Measure | Value |
|---|---|
| Tenants deployed from a Mac on one client | 26 |
| Active report builds published from a Mac on another | 11 |
| Power BI Projects edited as text | 99 |
| Typical refresh after a publish | 0.5 to 3.5 min |
| Share of the week on the Mac | over 70% |
| Windows jobs left | 1, visual design |
Videos
Videos 1 to 3 and their transcripts land here after the recording.
