Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
fro_oo
Regular Visitor

How to provision a new workspace using OSX Azure CLI?

That is driving me insane.

 

My main goal is to embed POWER BI reports/tiles in my Rails Web App.

 

I have a POWER BI account with some reports. I have also created a Workspace collection on the Azure Portal for Power BI Embedded.

 

Through the portal I can't add a Workspace to my WorkspaceCollection (why M$?)

 

I'm working on OSX so I can't follow those instructions (PowerBI-embedded.sln in Visual Studio):
https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-get-started-sample/

 

So, as an alternative I'm using the OSX Azure CLI:
https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-install/

 

After login I'm able to do this:

 

$ azure powerbi -h
help: Commands to manage your Azure Power BI Embedded Workspace Collections
help: 
help: Create a new workspace collection
help: powerbi create [options] <resourceGroup> <name> <location> [tags]
help: 
help: List workspace collections within subscription or within resource group
help: powerbi list [options] [resourceGroup]
help: 
help: Commands to manage your Power BI Workspace Collection keys
help: powerbi keys list [options] <resourceGroup> <name>
help: powerbi keys renew [options] <resourceGroup> <name>
help: 
help: Commands to manage your Power BI Workspaces
help: powerbi workspaces list [options] <resourceGroup> <name>
help: 
help: Options:
help: -h, --help output usage information
help: 
help: Current Mode: arm (Azure Resource Management)

 

...and this:

 

$ azure powerbi list
info: Executing command powerbi list
+ Getting workspace collections in subscription: 12345678-1234-1234-1234-123456789012
data: Name Group Location Provisioning State Tags
data: --------------------------- --------------------- ----------- ------------------ ----
data: MyCompanyWorkspaceCollection MyCompanyResourceGroup West Europe Succeeded null
data: MyCompany-WC MyCompanyResourceGroup West Europe Succeeded null
info: powerbi list command OK

 

Great!

 

Now, how can I provision a new Workspace in my MyCompanyWorkspaceCollection (`Provision a new workspace in an existing workspace collection`)?
And After that, How to import a PBIX file into that Workspace?

 

Many thanks for your advices!

3 REPLIES 3
fro_oo
Regular Visitor

To succeed I had to forgot everything I had read before... and start again with this:

https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-iframe/

 

ON AZURE PORTAL

Create Power BI workspace collection, and get access key (Provisioning)

 

GET A PBIX

From Power BI Desktop or a sample file

 

WITH A CLI

(must use that one : https://github.com/Microsoft/PowerBI-Cli )

Create a Power BI workspace

Import .pbix file into the workspace

Get report id

 

IN MY RAILS APP

(using https://github.com/jwt/ruby-jwt )

Embed the report into the web page

 

I can't tell about the many bugs encountered, or the signup/login problems with Azure... it was really painful to get there.

 

Cheers everyone.

That might be a better question for Azure CLI forum.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.