Plan
- The MVP Contributions "timesheet"
- MVP Production API
- Custom Connection via Swagger
- Set up the Flow
- Future ideas
The MVP Contributions "timesheet"
The Microsoft MVP award is a recognition of our various activities throughout the previous year, and it is measured with both "reach" and "impact". So, at a minimum, we have to do timesheets. I really really don't like doing timesheets.
We really should be able to do this automatically.
Write a blog? Made a podcast? RSS -> Automatic.
Wrote a tweet? Automatic. (your MVP lead will probably have a chat with you about this)
IoT senses temperature change? What better time to log an entry!
MVP Production API and the MVP PowerShell module
The MVP program with contribution from several MVPs created a set of APIs for querying and posting our profiles, contributions and details. The starting point is here:
https://mvp.microsoft.com/en-us/Opportunities/my-opportunities-api-getting-started
To call this API, we need two pieces of authentication - we need OAuth to Windows Live Account, and we need an API key from the MVP API. Follow the steps in the post and you'll end up with:
- an MVP Production API subscription, which gives you a primary and secondary Api-Key
- a MSA application with ClientID and ClientSecret
I want to note that there are existing work in a MVP PowerShell module
https://github.com/lazywinadmin/MVP
It works the same way, but because it doesn't remember your tokens, every time you run the PowerShell you need to login via a Live, get a token, then make the submissions and then when the PowerShell session finishes you lose everything. So while this helps with entering the details, but doesn't help you manage your OAuth token, it certainly isn't "hands free / automatic".
So we will do this, automatically, with Flow
Custom Connection via Swagger
I frequently sing praises for Jan Vidar Elven's blog post on custom connector.
https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-flows/
I'm connecting a Custom Connection to Flow to help me manage the MSA account. This is an extension of his detailed blog post.
To be able to call the MVP API we will need a Swagger (OpenAPI file) to create a custom connection. After some struggling - I've got a working version of the swagger file here:
https://github.com/johnnliu/flow/blob/master/MVP%20Production.swagger.json
You can read this, but to use it - you need to replace line 35:
"default": "ae2edf7-YOURKEYHERE",
With your real subscription key from the API. You can use either the primary or the secondary.
Save the swagger file. We go into Flow.
Set up the Flow
Start in Flow - create a custom connector by Importing an OpenAPI file