Requirement – User will open power bi embedded in Microsoft Dynamics 365 for finance and operations. Pre-filtered data of vendor purchase invoices should come only for those warehouses which are tagged to current user or running user id.
Solution – In D365 FO we use class- PBIReportControllerBase to call a Power BI embedded report. The class PBIReportControllerBase contains below methods. The method basicFilters() can be utilized to filter your Power BI datasets with the help of class PBIReportBasicFilter
In standard there are 2 classes – FMPBIReportsController (Model – Fleet Management) & LedgerCFOWorkspaceEmbeddedController. Here, Microsoft is filtering power BI Record set based on selected values (Please make a note – table name and column name should be same as Power BI Report dataset and column name Not your aggregate measure or AX DW tables and column)
So, in our case we are filtering dataset based on warehouse tagged with current users
Introduction – In November 2020, Microsoft renamed or rebranded Common Data Service as Dataverse. This is not first time, Microsoft is renaming and rebranding any product. For example – Microsoft Flow was rebranded as Microsoft power Automate. Dataverse (formerly knows as Common Data Service Or just CDS) allows securely store and mange data that can be used in Power Platform Products like Power Apps or other business apps.
In Microsoft Dynamics 365 finance and operations, Entity store is database (AxDW) which you can use in D365 FO POWER BI dashboards for realtime analytical reporting . Click here to read more about entity store.
What is Azure Data Lake ?
Microsoft Azure Data Lake is cloud based storage and analytics service . Azure Data lake allows data scientist and data engineer to store any kind of large data and performing analytics, machine learning & AI operations on it. Click here to read more about entity store.
Quick Steps Exporting Entity Store in Azure Data Lake
Deploy a new storage account in azure portal. Don,t forget to mention Account kind as StorageV2. Most important, in Advance TAB Enable the Hierarchical namespaces feature else you will not be able to consume Azure Data Lake data in Power BI.
When the deployment is completed, go to your recently deployed storage account and navigate to Settings –> Access Keys . Note down the connection string value, it will be used in coming steps
Deploy a KEY VAULT resource in portal.azure.com as per your comfort.
After deployment of key vault , go to your Azure KEY VAULT resource and navigate to Settings — > Secrets.
Click on button + GENERATE/IMPORT & create a SECRET. Fill a name for the secret and not it somewhere as NAME will be used in next steps. In the VALUE Field please Enter the connection string i (connection string you obtained from previous steps inside STORAGE ACCOUNTS)
Secret KEY is created
Go to Azure portal, select Azure Active Directory, and then select App registrations. You need to register an App
After registering you APP, navigate to –>API permission and Configured permissions as mentioned below.
In your registered APP, navigate to –> Certificates & secrets. Generate a new client secret and copy it immediately somewhere.
Now go back to your KEY VAULT Resource and click on access polices.
In the Select principal field, select the name of the application that you previously registered.In the Key permissions field, select Get and List permissions.In the Secret permissions field, select Get and List permissions.
Now open your D365 finance and operations environment and go the SYSTEM PARAMETERS . Fill the below details
Application ID: Enter the application ID of the Azure AD application that you registered earlier.
Application Secret: Enter the application key (secret) for the Azure AD application.
DNS name: Enter the DNS name of Key Vault.
Secret name: Enter the name of the secret that you added to Key Vault together with connection string information.
Validate and Test AZURE KEY VAULT as well as AZURE DATA STORAGE
Refresh Entity Store
Now your entity store is available in Azure Data Lake.
Microsoft Dynamics AX, Microsoft Dynamics 365 for Finance and Operations, D365 FO, Retail, SQL, Microsoft Power Apps, Microsoft Power BI, Microsoft Azure, Logic Apps, Microsoft Flow, Microsoft power automate, Microsoft Power Platform,.Net, X++, C#, Power BI DAX, Data Warehousing, Microsoft Analysis Services, SQL Server Reporting Services