如何使用azure CLI创建Power BI Embedded工作区?

fro*_*_oo 3 azure azure-management-api powerbi azure-cli powerbi-embedded

那让我发疯。

我的主要目标是将POWER BI报表/图块嵌入我的Rails Web App中。

我有一个带有某些报告的POWER BI帐户。我还在Power BI Embedded的Azure门户上创建了Workspace集合。

通过门户,我无法将工作区添加到我的WorkspaceCollection中(为什么要使用M $?)

我正在使用OSX,因此无法遵循这些说明(Visual Studio中为PowerBI-embedded.sln):https ://azure.microsoft.com/zh-cn/documentation/articles/power-bi-embedded-get -started-sample /

因此,作为替代方案,我正在使用OSX Azure CLIhttps : //azure.microsoft.com/zh-cn/documentation/articles/xplat-cli-install/

登录后,我可以执行以下操作:

$ 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)
Run Code Online (Sandbox Code Playgroud)

...和这个:

$ 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
Run Code Online (Sandbox Code Playgroud)

大!

现在,如何在MyCompanyWorkspaceCollection()中设置新的工作区Provision a new workspace in an existing workspace collection

然后,如何将PBIX文件导入该工作区

非常感谢您的建议!

fro*_*_oo 5

谢谢@CuongLe。

你好

为了获得成功,我不得不忘记之前阅读的所有内容...,然后重新开始:https : //azure.microsoft.com/zh-cn/documentation/articles/power-bi-embedded-iframe/

ON AZURE PORTAL创建Power BI工作区集合,并获取访问密钥(配置)

从Power BI Desktop或示例文件获取PBIX

使用CLI(必须使用一个CLI:https : //github.com/Microsoft/PowerBI-Cli)创建Power BI工作区将.pbix文件导入工作区中以获得报告ID

在MY RAILS APP中(使用https://github.com/jwt/ruby-jwt)将报告嵌入到网页中

我无法讲述遇到的许多错误或Azure的注册/登录问题...到达那里真的很痛苦。

欢呼大家。