Slides from M365 Twin Cities 2023

A huge thank you to the attendees, organizers, volunteers, sponsors, and anyone else involved with M365 Twin Cities. This was my first community conference in 3+ years but it was amazing to share more about Microsoft Graph in my two sessions. I appreciate all of the attendees who joined and had great questions and engagement.

Below are PDF copies of the slides I presented. If you have any questions, feel free to ask in the comments here or reach out to me. Look forward to presenting at more events later this year as opportunities arise.

Getting Up to Speed with Microsoft Graph Development

How to Use Power Automate and Microsoft Graph in Daily Work

-Frog Out

Resources (see more in Resources on this blog)

Microsoft Graph developer center
https://aka.ms/Graph

Microsoft Graph Explorer
https://aka.ms/ge

Microsoft Graph Postman collection
https://aka.ms/GraphPostman

Microsoft Graph extension for Polyglot Notebooks
https://github.com/microsoftgraph/msgraph-dotnet-interactive-extension

Microsoft 365 platform community call (series invite)
https://aka.ms/m365-dev-call

Retrospective for 2022

Continuing my tradition of writing a retrospective (2021, 2020201620152013201220112010) or look ahead (201920142013201220112010), in this post I’ll recap 2022 and share goals for what is ahead in 2023.

Retrospective

A few years ago, my wife and I bought a digital picture frame as a Christmas gift for our family (one of the best gifts as our kids love seeing older pictures of our family). This morning I saw down to review photos my wife and I took over the last year to load onto our picture frame. Turns out 2022 was an interesting year for a number of reasons:

  • The first half of the year (almost) everyone in our photos was masking / social distancing (compared to now when it is much less common)
  • My wife and I are reminded of the sweet times when our kids are hugging, helping each other, etc. instead of the other times when they are “not as sweet”
  • Family traditions are starting to develop (special photo poses during summer vacation, birthday celebration activities, etc.)

Overall, 2022 was a good year, so here is a look back at some of the bigger things for me personally.

Reading books

Building on my 2021 book challenge to read more (finished 10 with a goal of 4 that year), in 2022 I set a goal of reading 6 books. I received great book recommendations from friends / co-workers and I ended the year reading 18 books. You can view my list of books read in 2022. I most recommend the following:

Going into 2023 I’m targeting 8 books for the year. I could target higher, but I’m also getting more involved in a number of school / church / family commitments this year, so I want to leave room for those as well.

Fitness

At the start of 2022 I purchased a Treadly 2 treadmill. This came highly recommended from a former teammate of mine. (Ignore all of the wires under my desk, project for another day…)

My goal was to get 15-20 mins of walking in my home office (I have an adjustable desk) a few days a week. Over the course of the year, I slowly increased the speed and duration of my walks. By the end of the 2022 I was walking 60-75 mins 3-5x times a week.

As an added bonus, I found out through my tracking app that I walked 120+ days of the year (literally 1 in every 3 days) and also walked more than 1,000,000 steps total.

Separately I’ve also been using a “core body” workout app to do a short morning workout for 10-20 mins about 3-4x times a week. I started halfway through 2022 and made good progress. I’ve lost 10 pounds and kept it off as well as shrunk my waist size a bit. Nice to have pants fitting more comfortably again.

I’m continuing my treadmill walking and exercise into the new year. I completed 2x 4-mile races at the end of last year. I don’t have goals to complete more races this year though as I hadn’t trained for those (treadmill walking doesn’t really compare to outdoor running).

Conferences

Due to the COVID-19 pandemic, most in-person conferences were cancelled or went virtual over the past 2+ years. The Stir Trek Conference that I help organize came as a hybrid event last May. We were not certain how attendance all-up would be, let alone in-person attendance. We had a lower target for all-up attendance (1,500 total, ~1,000 in-person) but were pleasantly surprised that we sold out of tickets and did end up having more than 1,000 attend in person last May.

Our board of organizers is very thankful to everyone who supported us through the pandemic. Especially from a good number of attendees and sponsors agreeing to keep their registration money with us (we had a big financial hit from cancelling our 2020 event). We’ve already begun planning for 2023 and are looking to open up tickets to our previous max (~2,100 total).

Separate from Stir Trek, in 2022 I did present at a number of virtual events and conferences, most of them internal or Microsoft-run events though. Starting off 2023, I’m Presenting at M365 Twin Cities 2023 which is my first presentation at a community conference in over 3 years. Looking forward to other opportunities over the coming year.

2022 goals progress

Recapping my goals for 2022, I can confidently say I hit all of them.

  • Read 6 books (read 18)
  • Walk 5 miles per week (6-9 miles most weeks)
  • Compete in a dance competition (March 2022, and no I’m not sharing pictures 😉)

Looking ahead

My wife and I are kicking off 2023 with some family planning activities as well as home organization projects. We’re also celebrating our 10 year wedding anniversary later this year, so looking forward to a special trip near the end of the year.

Aside from those things, we’re actively encouraging our kids to find activities or clubs that spark their interest. This also means getting to know more families at our school and other places. Overall, I think 2023 will be a year focused on family growth / evolution, but without specific goals in mind at the moment.

Conclusion

As the world continues to experience many ups-and-downs, what are you focusing on for 2023? What things do you want leave behind or continue doing from 2022? Feel free to share any ideas or answers in the comments.

-Frog Out

Sources

Header Image by Ludo-Photos from Pixabay: link

Presenting at M365 Twin Cities 2023

After a few years off from community speaking engagements I’m excited to return to speak at M365 Twin Cities (formerly SharePoint Saturday Twin Cities, now with expanded scope and topics) on Jan 21, 2023. I’ve spoken at this conference twice before and have been very impressed with the level of organization, attendee engagement, and content all-up. I’ll be presenting the following 2 sessions. Registration is still open. If you are in the area, please sign up and look forward to seeing you there.

M365 Twin Cities
https://www.m365tc.com/

Registration
https://www.eventbrite.com/e/m365-twin-cities-winter-2023-tickets-471566266397

Title: Getting Up to Speed with Microsoft Graph Development

Description: “I hear that I need to use Microsoft Graph for developing against Microsoft 365 but I have no clue where to start.” “I want to grant access to company data without throwing in the entire kitchen sink.” Fear not fellow developers and admins. This session we will ramp you up to a 200 level knowledge on the pertinent parts of Microsoft Graph including endpoints available, syntax, authentication flows, and more. We will also cover useful examples of what can be accomplished using these APIs. Prior experience with Microsoft Graph is not required but can be helpful.

Title: How to Use Power Automate and Microsoft Graph in Daily Work

Description: Do you need to automate parts of your daily work routine? What Microsoft Cloud data is available through Microsoft Graph for automating? In this session we’ll walk through multiple real world examples of using Power Automate for daily tasks such as assigning round robin tasks to team members, sending weekly reminders, processing survey results, and more. Prior experience with Power Automate is useful but not required. Target audience is open to all (productivity workers, developers, admins, etc.)

-Frog Out

Expressing Gratitude When Others Help You

Who has helped you recently? When did you last send them a praise / kudos / etc.?

On a monthly basis I lead a team retrospective for our Microsoft Graph CPx team. I generally adjust the questions each month so that we don’t keep repeating the same questions / responses each month.

This month, as part of our retrospective I posed the questions at top of this post.

  • Who has helped you recently?
  • When did you last send them a praise / kudos / etc.?

While everyone was able to identify people or teams that have helped them, responses to the second question varied from “I send perspectives feedback / praise regularly to X, Y, and Z” to “I haven’t sent anything to those people in awhile, thanks for the reminder”.

Personally, in addition to my monthly personal retrospective I also schedule time (~15 mins) on my calendar each month to send out praise to people that have helped me recently. Case in point, as we’re wrapping up this calendar year I just filled out 3 perspectives feedback requests before writing this post.

I encourage everyone to make a habit (schedule recurring time on your calendar, set a repeating ToDo reminder, etc.) of:

  1. identifying people that have helped you in the last week / month
  2. send those people a thank you / praise / kudos

How are you expressing your gratitude to others that have helped you?

-Frog Out

Introduction to Calling Microsoft Graph from Polyglot Notebooks (.Net Interactive)

This post is a part of Festive Tech Calendar 2022 and a follow-up to Introduction to Calling Microsoft Graph from a C# .Net Core Application from 2018.

Microsoft Graph is the unified API for any developers working with data inside Microsoft 365, Azure Active Directory (Azure AD), Windows, and more.  In this post, we’ll cover how to call Microsoft Graph from Polyglot Notebooks (part of .Net Interactive). We’ll also introduce a preview of the Microsoft Graph extension for .Net Interactive.

Background

Do you ever want to test a few lines of code, but have to write dozens of lines of support code (i.e. “boilerplate” or “basic plumbing” code)?

Microsoft Graph has a number of offerings such as quick starts to let you pick a supported code language, download a sample application, and run the project within a few minutes, but this can still take 5-30 mins depending on your level of familiarity.

Separately, there is Microsoft Graph Explorer or the Microsoft Graph Postman collection to quickly execute a query against Microsoft Graph (seconds to minutes usually), but these only execute HTTP REST endpoints and not using SDKs (which I prefer).

I’ve used 3rd party tools such as LINQPad or websites like .Net Fiddle to quickly prototype and execute Microsoft Graph SDK code but these are often disconnected experiences from where I typically develop which is Visual Studio Code.

.Net Interactive and Polyglot Notebooks

Enter .Net Interactive. .Net Interactive builds upon the Jupyter ecosystem (notebooks, kernels, server, etc.) to allow programming in a notebook fashion (executable code alongside text) but with support for multiple languages (C#, F#, JavaScript, PowerShell, SQL, and more). With this added support for multiple languages, the Visual Studio Code extension has been recently renamed to Polyglot Notebooks (previously called .Net Interactive Notebooks), but the base engine itself is still called .Net Interactive.

At a base level, Polyglot Notebooks allow you to write snippets of executable code in multiple languages alongside markdown text blocks. This is great for writing tutorials, sharing a sample of code with someone with explanation (beyond simple comments in the code), or designing a multi-step process of code blocks.

.Net Interactive is also extensible by allowing developers to create custom kernel extensions, magic commands, or script-based extensions.

Microsoft Graph extension for .Net Interactive

During a recent company hackathon event, myself, Jason Johnston, Jon Sequeira, and Diego Colombo built an initial prototype of a Microsoft Graph extension for .Net Interactive. The extension implements a magic command for #!microsoftgraph that can create and authenticate a GraphServiceClient and then binds it to a variable that can then be used in code blocks. The magic command accepts input parameters to control authentication flow, Azure AD application / tenant, Microsoft Graph API version, and more. The current repository includes support for C# (.Net) but we’re also exploring JavaScript and PowerShell in the future.

Prerequisites

There are a few prerequisites that you will need install

Getting started

After above requirements are met, you can get started by following the instructions in the GitHub repo README or the demo notebook.

Let’s take a look at a few samples.

Create a polyglot notebook

To create a new polyglot notebook, open the Command Palette(Ctrl+Shift+P) on Windows or (Cmd+Shift+P) on MacOS, and select Polyglot Notebook: Create new blank notebook. You can also create a new notebook with Ctrl+Shift+Alt+N key combination on Windows.

Build the NuGet package

After forking the repository, navigate to the source directory and run the following command (or execute in a PowerShell code block inside the notebook) to generate a NuGet package which we will then import in the next steps.

dotnet build ./src/Microsoft.DotNet.Interactive.MicrosoftGraph.csproj

Import the NuGet package

After the NuGet package has been built, run the following commands (be sure to replace <REPLACE_WITH_WORKING_DIRECTORY> with the actual directory location) in a C# script block in the notebook to import the NuGet package.

#i nuget:<REPLACE_WITH_WORKING_DIRECTORY>\src\bin\Debug\
#r "nuget:Microsoft.DotNet.Interactive.MicrosoftGraph,*-*"

Help example

Executing the #!microsoftgraph magic command with -h or –help will display the syntax and parameters available for input. Note that options are available with full name (two dashes “–“) or aliases (one dash “-“).

#!microsoftgraph -h

Create client

The following creates an instance of a GraphServiceClient with variable name “deviceCodeClient” using the device code authentication flow. Be sure to replace the input parameters for “YOUR_TENANT_ID” and “YOUR_CLIENT_ID”.

#!microsoftgraph -t "YOUR_TENANT_ID" -c "YOUR_CLIENT_ID" -a DeviceCode -n deviceCodeClient

Since we used -n to name the GraphServiceClient instance that is created, we can now use that variable going forward to make requests.

Make requests

Now you can execute Microsoft Graph .Net SDK code using the deviceCodeClient GraphServiceClient just created. We will be prompted to complete the device code authentication flow at this time. Follow the prompt and provide the device code provided.

var me = await deviceCodeClient.Me.GetAsync();
Console.WriteLine($"Me: {me.DisplayName}, {me.UserPrincipalName}");

Live demo

Recently Jason Johnston and I joined the M365 platform community call to give an overview and demo of the Microsoft Graph extension for .Net Interactive. If you want to skip to just the demo, jump to 8:28 timestamp in the video to see things in action.

Conclusion

As you can see, the Microsoft Graph extension for .Net Interactive offers a way to write code and text side by side. There are many scenarios that can benefit from this such as workshop tutorials, exploring the SDKs, prototyping solutions, and more. We welcome your input on feature requests, contributions, raising bugs, etc. Please submit issues or pull requests to the GitHub repository and we will review. Thanks and enjoy!

-Frog Out

Resources

Interactive C# with Polyglot Notebooks (good introduction to getting started with Polyglot Notebooks in .Net Interactive)
https://newdevsguide.com/2022/12/14/polyglot-notebooks-csharp/

Find recurring meetings that have ended with Microsoft Graph

Calendar with date circled

When I joined the Microsoft Graph team I set up recurring 1:1 meetings with each of my teammates and a number of people from other teams within our group. As luck would have it those meetings defaulted to have an end date ~1 year from when the series was created.

As you might guess, I forgot to extend some of those meetings and then after they reached their end date I had to go through my calendar to find which ones were impacted and extend them.

The below query is intended to find all recurring meetings on your Exchange Online calendar. It is not a complete solution as I haven’t figured out the exact syntax for recurrence property with an end date in the past. Hopefully someone finds this useful and if you have enhancements to help with filtering please feel free to share in the comments.

Click here to try this out in Graph Explorer

Ex. query

https://graph.microsoft.com/v1.0/me/events?$filter=type eq 'seriesMaster'&$select=id,subject,recurrence

Note that type = ‘seriesMaster’ will only find the series and not individual meeting instances which may have exceptions from the original recurrence pattern.

-Frog Out