DEV Community

Cover image for My Power Platform - Your Year in a Dashboard
david wyatt
david wyatt Subscriber

Posted on

My Power Platform - Your Year in a Dashboard

If anyone follows me, there are 2 things I like doing, writing and creating quirky Chrome extensions for Power Platform devs, well this is where my 2 worlds meet.

Last year I saw a cool single web page app someone spun up that used the dev.to api to create a personal dashboard for 2023 on your blogs. I thought how cool, I wish I could do that on the Power Platform. Guess what, for 2024 I did.

My Power Platform is a simple extension that grabs all your Power Platform data and transforms it into a simple dashboard.

This blog is all about how to use it and how I built it (without the codey bits, though its open source so you can look at it, but my coding is so bad I wouldn't 😎).

my power platform dashboard

How to use it

Its super simple, you:

  • Install the extension from Chrome store (works on all Chromium browsers like Edge, Brave, etc too)
  • Log in at make.powerautomate.com
  • Click the extension icon
  • Wait a few seconds

and that's it.

The dashboard has 6 data areas and a couple of buttons/inputs.

Timeline

The timeline pulls your following:

  • All Power Automate Flows
  • All Solution-aware Canvas Apps
  • All Copilot Agents

And plots it with months on the x axis, and each of the above have their own line. Also I think Agents also include actions and prompts, but not 100% sure.

timeline chart

Components

The baby chart, this shows totals of the same as the timeline: Flows, Apps, Agents.

components charts

Solutions

The Solutions chart shows the distribution of Solutions across top 4 environments, created by you.

solutions

Environment Variables

This chart shows the mix of the different type of environment flows:

  • String
  • Number
  • Boolean
  • JSON
  • Data Source
  • Secret

Again, they have to be created by you.

environment var chart

Connection References

Final chart, this one is for Connection References, with the chart showing the main connection types you use:

  • SharePoint
  • Dataverse
  • Outlook 365
  • MS Forms
  • Office 365 Users
  • MS Teams
  • Power BI
  • Excel Business
  • OneDrive Business
  • Approvals
  • And all the rest

connection references chart

The Blurb

There is one more data section, the Blurb. Its a few key data call outs, like biggest Solution, average components, etc.

You will also be tagged as one of the following:

  • Flow Rider - mostly Flows
  • Canvas Campbell - mostly Canvas Apps (thank you ChatGPT for that name)
  • Agent Smith - mostly Copilot Agents (first one to show this please share)

but to make it fair I weighted it, 2 flows per App, 2 Apps per Agent.

the blurb

Finally the Buttons

I had to add a little bit of functionality, so the extension can do 4 things.

1. Change Date Range
The dashboard defaults to filter by the current year, but you can change the range. Simply change the from and to date pickers and click update.

Callout here, if you go over a year it will stack the months, so you wont see 24 months on the X axis, just 2 years summed up.

2. Data
Downloads the key data in a JSON file. This is a raw list of every component, with some key information like name and id.

3. Envir
Downloads list of environments with some of the components total.

4. CSV
Downloads list of every component in a CSV.

I also add local storge, so it saves the data when ran, meaning if you open the extension without the token it will load the last import of data.

How does it work

The extension basically 'borrows' your access token to call the Power Platforms API's to pull all the data. Then uses a very funky library called chart.js to show the dashboard.

api process map

It uses following APIs:

Get User ID
{dyanimicsUrl}/api/data/v9.2/WhoAmI

Get User Name
{dyanimicsUrl}/api/data/v9.2/systemusers({userId})

Get Flows
api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/{environmentId}/flows?api-version=2016-11-01

Get Apps
{dyanmicsUrl}/api/data/v9.2/canvasapps?$filter=_ownerid_value eq 'userId' and createdtime ge {dateFrom} and createdtime le {dateTo}

Get Agents
{dyanmicsUrl}/api/data/v9.2/bots?$filter=_ownerid_value eq 'userId' and createdon ge {dateFrom} and createdon le {dateTo}

Get Connection References
{dyanmicsUrl}/api/data/v9.2/connectionreferences?$filter=_ownerid_value eq 'userId' and createdtime ge {dateFrom} and createdtime le {dateTo}

Get Environment Variables
{dyanmicsUrl}/api/data/v9.2/environmentvariabledefinitions?$filter=_ownerid_value eq 'userId' and createdtime ge {dateFrom} and createdtime le {dateTo}

Get Solutions
{dyanmicsUrl}/api/data/v9.2/solutions?$filter=_createdby_value eq 'userId' and createdtime ge {dateFrom} and createdtime le {dateTo}

Get Solution Components
{dyanmicsUrl}/api/data/v9.2/solutioncomponents?$filter=_createdby_value eq '{userId}' and _solutionid_value eq '{solutionId}'

Couple of call outs I learned on the way

  • First the canvas apps table uses a 'createdtime' where as every other table uses 'createon', why, just why!

  • The Flow API I used for the environments and My Flows isn't very good, no query filters so all done in the code.

  • My Canvas Apps requires different API so different token so I use the Dataverse table, this means it only shows solution-aware apps (maybe one day I will make a Power App version, but trade off will be the Flows will be solution-aware only instead).

  • Connection References connectors are almost infinite, so I had to target the few I thought were top, sorry if I missed some important ones.

  • The bot (Agents table) and connectionreference tables are dynamically added, so they don't have a set entity number across environments. You can find it by querying the entity table, but that's for a future update.

  • There are a few solutions that Microsoft installs automatically for you, but as you create the environment you create them, so they appear in the data. One of those solutions had over 180 components, so was always top. Luckily I found they were all prefixed with 'msdyn' in the uniquename column, so I filter them out.

  • There will be some quirks, like components shared with you that wont appear, and components created before but edited this year. I could use modified, but turning solution-aware flows on/off modifies the table so would also mess with the data. In the end I went simple, but maybe improve later.

  • Sometimes (often if you have access to a lot of environments) the 'Who Am I' API fails, but when I manually call it it it works. I'm guessing its a throttling issue, I flag those in the data loading list by turning icon red.

  • This was a last minute.com thing, managed to build it in a few days so its not perfect (cough buggy 🪲🪲🪲🪲).


Not sure if there will ever be another version, but you never know so feel free to chuck any bugs in the comments and I will see what I can do.

Link here to install.

GitHub repo https://github.com/wyattdave/my-power-platform to have a look/clone/contribute.

Hope you enjoy playing with it 😎

Top comments (0)