Share and Enjoy !

Find this Podcast “Automate Microsoft Teams Provisioning” on the ThreeWill Soundcloud, Stitcher, and iTunes.

From Pete: Here a link to my blog post about the lab: https://peteskelly.com/creating-a-microsoft-graph-json-batch-custom-connector/

Transcript

Danny Ryan:Hello and welcome to the Two Bald Brothers and a Microphone podcast. This is your host, Danny Ryan. I’m here with another bald man, but it’s not my brother. It is Pete Skelly.

 

How are you doing, Pete Skelly?

 

Pete Skelly:I’m doing well. How are you?

 

Danny Ryan:I’m doing great. Thank you. I’ve got a couple of things to talk about. The first thing we’d like to talk about is some recent work that you did with Microsoft, and give me a little bit of background on what you did here.

 

Pete Skelly:The background is one of the things you and I have been working on, and I know you’ve done probably at least one, if not more, podcast episodes on our internal transformation to modern SharePoint in teams and those types of things. Part of what I was doing in sort of the opposite side is doing some internal automation, looking into things like Flow and Microsoft Graph and auto-provisioning, automatically provisioning teams and Planner or OneNote and associated things that go along with an Microsoft 365 group. The sort of short story is I was trying to do some things in Flow calling Microsoft Graph, and the endpoint that I was actually calling I could not get to work.

 

 

Danny Ryan:Okay.

 

Pete Skelly:I actually reached out to a couple of folks, Jeremy Thake, who is a senior program manager on the Microsoft Graph team and someone that I know from the community, John Lu, who’s based in Australia and tweeted out to them and said, “Hey, I’ve been trying to add a team to a group via the Graph and it’s not working and was wondering if anybody knew what the issue was.”

 

 

Turns out that Thursday and I was doing this, I think the following Monday, turns out John was actually on the Microsoft Graph community call explaining exactly how to solve my problem the week previous. Although part of me job is to stay up on some of those things, I missed that call. So, I actually had to kind of back track and use John’s solution that he described in that community call and it worked perfectly and I tweeted that back out to Jeremy and John and several other folks commented around it and Jeremy said, “Great, would you and John like to document that process for sort of a lab for the Microsoft Graph community content?” That’s sort of how it started.

 

Danny Ryan:Very nice. Was this through like the PNP process or what does this have to do with that? Or is this him just solving the problem for the community?

 

Pete Skelly:This is sort of alternate route to using PNP. You can kind of layer in some PNP calls and use some of the PNP processes, but I think from our perspective at least internally and for some of our clients, you a lot of times get into a hybrid situation where you might use Flow to kick off a process because you’re using a list, a Share Point list, to actually manage the process. For me in particular, my scenario was not using the PNP to accomplish creating the group and adding a team to that group then creating default channels and creating OneNote and kind of all the associated things that go along with our internal processes. I wasn’t doing the PNP stuff but this is more just Microsoft base-Microsoft graph and kind of [inaudible]. Sort of the twist on what I was doing was I wanted to batch up several of these commands so I was actually looking into using the Microsoft batch endpoint.

 

The batch endpoint is pretty powerful between sort of a lab that we did and John Lu’s post. The batch endpoint really provides you a really great way of making several calls, a batch, to graph endpoints and being able to sequence those so you can have dependencies of calls so if you want to create a group and then you want to create a team, add a channel, and you want those to occur sequentially. You can do that.

 

What I was doing was essentially setting up, creating a team or excuse me, creating a Microsoft 365 group that I then want to create a team from, provision team resources in including channels, and apps, and tabs. I want to configure the Share Point site behind the scenes. I also want to configure a OneNote and some OneNote sections and OneNote’s actually pre filling basically, a structure for what someone might request.

 

The process, the lab that we did goes through that. It basically starts from scratch and builds up a Azure de application. Helps you create a custom connector in Flow, that actually lets you- the reason I had to do this was at the time, the graph did not support making app only, basically operating as a application, not as a person, did support app only permissions. It supported delegated permissions only. That use of a custom connector let me kind of overcome the hurdle of not having those apps only permissions and then using the batch calls let me kind of do some advance work to actually say, don’t sequentially go through everything and have this massive flow. I could actually make several calls at once and create several pieces of the pie so to speak for my scenario.

 

The lab actually walks you through creating that connector, then testing how to call the batch, what that batch endpoint actually means and then walks you through creating a flow and extending that flow to call a batch using the batch connector, call in to the batch graph endpoint and at the end you have a fully functioning flow that can do exactly what I just described. Create a group, create a team, add channels to that team and then you’re off and running. You can basically do pretty much everything you want from the graph.

 

Danny Ryan:I guess we were looking at this as far as trying to automating the provisioning process and how do we want to set everything up when someone requests a new team. You’re getting everything- all the initial stuff all set up, is that right?

 

Pete Skelly:Yeah, it’s a very- internally it was something we wanted to do but it’s a very common request from our clients. Provisioning and governance is a very common request. The classic canonical example is, I wanna provision a project site and I want that project site to be based on a group so there’s a team and I want certain channels automatically created. I want general structure put in place. Well, today a lot of people want not just a team, so a group behind the scenes, but they also want things that go along with that collaboration experience. They want Planner, they want OneNote, they want a standard OneNote structure. They want certain things in teams. They may want apps configured inside of teams. Although the lab seems very simple it sets you up to be able to do some really fantastic things inside of the flow, if you want to do them all in a flow. If not, you have the ability to say, “Okay, well let me kick off of a process in flow and maybe call other flows or call an Azure function or Azure automation services to do things like call into PNP and configure a very complex structure in SharePoint for example.”

 

For us it was sort of tip of the iceberg, but for our customers we’re starting to see them ask for, “Well, I want a provision and I have a governance plan and I want to implement that governance plan in a standard way.”

 

This was kind of greasing the skids so to speak so we could kind of show some folks this and also a lot of times we can’t show customer case studies or customer code or the solutions that we actually build, so this kind of lets us show some folks, clients, perspective clients and even me when I do community events, show folks heres what’s possible.

 

Danny Ryan:Can we link up the lab or to the blog post or both of those things?

 

Pete Skelly:Absolutely. I’ve got a blog- a blog post on my personal blog.

 

Danny Ryan:Okay, excellent.

 

Pete Skelly:It’s called Creating a Microsoft Graph Custom Batch Connector and that’s the exact same name of the docs.Microsoft.com lab

 

Danny Ryan:Excellent. We’ll link up to that. I think this is plenty of information for if you’re interested about that lab or more information on this, we’ll provide a link on this blog post and I really appreciate you doing this, Pete.

 

Pete Skelly:Okay, great.

 

Danny Ryan:Thanks so much for everybody for listening and have a wonderful day. Bye bye.

 

 

Share and Enjoy !

Related Content: