You have your development or test box deployed and running, and everything is working perfectly until you load a workspace containing Power BI Embedded and you are faced with this error:
This post will show you how to get the Analytics in the Workspaces working for one-box environments.
Important! The information presented in this blog are provided “AS IS” with no warranties and confer no rights. You assume all risk for your use.
My database properties:
The Power BI Embedded experience in Dynamics 365 for Finance and Operations relies on the Power BI Workspace collections on Azure. This feature was deprecated on June 2018 and we have not recieved any information from Microsoft on how this will be in the future. Currently the workaround described in the next steps are still working:
2. Click on “Build your own template in the editor”
3. Input this text in the template editor and input your Power BI workspace collection name (You can also change it to your preferred Azure region):
“name”: “GIVE YOUR PBI WORKSPACE COLLECTION A NAME HERE!!!!”,
“location”: “North Europe”
4. Save the template and select a resource group or create a new one. Click on “Purchase”.
5. After creating the Power BI workspace collection, open it and copy the access keys into Notepad. You will need them later.
To give D365DO access to the newly created Entity Store (AxDw) we need to create some users and add them to the database. Logon to your VM and run the following queries inside SQL Management Studio (Connect to your newly created AxDw, username and password will be the same as you used in the first step)
1. Create a new query in the “master” database. Insert the following:
CREATE LOGIN axdwadmin WITH PASSWORD = ‘samepasswordasinyourlcsenvironment’;
CREATE LOGIN axdwruntimeuser WITH PASSWORD = ‘samepasswordasinyourlcsenvironment’;
2. Run the query
3. Create a query in the “AxDw” database and run the following:
CREATE USER axdwadmin FROM LOGIN axdwadmin;
CREATE USER axdwruntimeuser FROM LOGIN axdwruntimeuser;
4. Then, create this query in the “AxDw” database and run the following:
ALTER ROLE db_owner ADD MEMBER axdwadmin;
ALTER ROLE db_datareader ADD MEMBER axdwruntimeuser;
First, search for this line and replace it with your server name:
<add key=”BiReporting.DWServer” value=” name of your windows server” /
Second, add these lines to the end of the <add key> section, right before </appSettings>:
Paste in the keys you copied from the Azure portal in here:
<add key=”PowerBIEmbedded.AccessKey” value=”Access key 1 from Power BI Workspace collection” />
<add key=”PowerBIEmbedded.AccessKey2″ value=”Access key 2 from Power BI Workspace collection” />
<add key=”PowerBIEmbedded.ApiUrl” value=”https://api.powerbi.com” />
<add key=”PowerBIEmbedded.IsPowerBIEmbeddedEnabled” value=”true” />
<add key=”PowerBIEmbedded.WorkspaceCollectionName” value=”Name of your Power BI workspace collection” />
Save the config file.
After editing the web.config file, perform a restart of IIS on the VM. When up and running again, logon to the D365FO client and make sure that everything runs like it should. Then do a restart of the batch service:
Do a refresh of the Aggreagate Measurements (See this article if you are unsure on how to do this)
Then go to a workspace and select the Analytics tab – the Power BI Embedded reports will be deployed “automagically” (Actually D365FO deployes the reports when you click the Analytics tab for the first time)
Any questions or comments feel free to reach out to me on email or via the comment section below.