Power BI custom connector to public API

Power BI custom connector to public API

Check out the article ApprovalMax Power BI Connector on GitHub for more information.

Requirements:

  1. Visual Studio Code
  2. Power Query SDK Extension for the VS Code (link) v0.2.3
  3. Power Query/M Language Extension for the VS Code (link) v.0.1.53
  4. Power BI Desktop

How to compile a connector

  1. Copy the repository from the official ApprovalMax GitHub:
  2. https://github.com/ApprovalMax/approvalmax-microsoft-powerbi-connector.git
    1. Install all the prerequisites and copy the files from the PBI_Connector folder into a new VS Code project.
    2. Create a new application in ApprovalMax My Applications
      1. Input https://oauth.powerbi.com/views/oauthredirect.html as the redirect URL
        • Copy your Client ID and Client Secret
    3. Open the cloned official repository and input your Client ID and Client Secret into the corresponding txt files. Replace the <YOUR_CLIENT_ID> and <YOUR_CLIENT_SECRET> placeholders without modifying the ID and Secret.
      1. Client ID → client_id.txt
      2. Client Secret → client_secret.txt
    4. Save the changes.
    5. In the VS Code, run a build task in order to compile the connector. This can be done via the menu (Terminal > Run Build Task) or via the shortcut (Ctrl + Shift + B). Then select the MakePQX option.

      How to run a build task
    6. When these steps are completed, a .mez file will appear here:
      PROJECTFOLDER\bin\AnyCPU\Debug\ApprovalMaxConnector.mez

      This is the compiled connector.

How to set up Power BI to use a custom connector

The next steps follow the official guideline (link).

  1. If it does not yet exist, create a folder [Documents]/Power BI Desktop/Custom Connectors and put the compiled .mez file into it.
  2. Start your Power BI Desktop and allow custom connectors to be used by going to File > Options and Settings > Options > Security and selecting the option (Not Recommended) Allow any extension to load without validation or warning. Click on OK at the bottom and restart the Power BI Desktop.
  3. Once you restart, a connector-related warning window could pop up. Just click on OK.

Getting the data

  1. In Power BI, go to Home > Get data > More..., then find and select the ApprovalMaxConnector (Beta) from the list.
  2. In the appeared window, click on the Sign-in button, which will redirect you to the login webpage. Log in to your account and grant consent for the respective Organisations. Next, click on Continue. Finally, provide a link to the endpoint you want to use. Do refer to the article ApprovalMax Public API for more details about each API method.
    Please note: In this step, you need to grant consent to requesting data from the selected Organisations. If you face any issues during this step, try to repeat it.
  3. If there is a connection already established, the connector won’t ask you to log in again.
  4. Use the Power Query Syntax in order to load the data into the actual Power BI Workspace.
    Power Query Editor


    • Related Articles

    • Public API Guide

      Our Public API Guide is available on our website, please follow this link to find it: ApprovalMax – Public API Guide
    • Prerequisites for using the Public API

      Before proceeding with the authorisation process for the ApprovalMax Public API feature, there are certain prerequisites that need to be met. These include: 1. Granting access to the Developer Portal: in order to access the Developer Portal and ...
    • Can I use Power BI for reporting? (QuickBooks Online)

      Yes, you can use the ApprovalMax public API for reporting purposes with Power Business Intelligence (Power BI). By integrating our API with Power BI, you can extract the relevant data for creating customised reports and dashboards that suit your ...
    • Can I use Power BI for reporting? (Xero)

      Yes, you can utilize ApprovalMax's public API for reporting purposes with Power BI. By integrating ApprovalMax's API with Power BI, you can extract relevant data, and then create customized reports and dashboards to suit your specific reporting ...
    • A list of endpoints available in the Public API

      For making calls against the API, please refer to the endpoints below, or to the swagger : Endpoints Description GET /ping This endpoint is used for checking the overall availability and responsiveness of the ApprovalMax Public API. When a GET ...