A Dummies Guide to using the Microsoft Graph in SharePoint and Microsoft Teams

We had a confluence of events last week. I was able to finally get some time to dig into the Microsoft Graph in the SharePoint Framework and version 1.7 of the SharePoint Framework was released. Needless to say, I said goodbye to my weekend.

Although there are a lot of steps to follow, it’s really easy to use the Microsoft Graph in a SharePoint Framework project which opens up the doors to creating some very powerful, personalized applications in SharePoint.

With version 1.7 of the SharePoint Framework, we are now able to easily build and deploy applications to tabs in Teams. Developers can now create an application in the SharePoint Framework that knows if it is executing in SharePoint or Teams and display content to the user accordingly.

And it all just works for the most part.

Rather than type out the instructions, I put together a rather rambly video for you guys to watch that takes you through the entire process.

If you only care about Teams development, you can jump to about 22:30 in the video.

Without further ado, here’s the video:

A couple of notes:

  • The MSGraphClient assumes a path for the api of “/v1.0/” so if you are wanting to use a beta endpoint you’ll need to change your path to reflect that using “../beta/”.
  • Again, you need version 1.7 of the SharePoint Framework to create Teams applications.
  • The Teams functionality is currently in preview and only available to targeted release tenants.
  • Make sure you create your Teams application using yo @microsoft/sharepoint –plusbeta
  • I was not able to get my Teams application working in my Desktop Client, I just got the spinny graphic (technical term), however deploying and using the application worked fine in the web client.

Resources

I used the following resources to put all the pieces together

That’s all there is to it! I plan on putting together a follow up video shortly on doing a POST to the Microsoft Graph that adds additional functionality to the application in the video.

I hope this helps you get over that initial hurdle and takes away some of the FUD around The Microsoft Graph and Microsoft Teams development.

Want to learn more about the Microsoft Graph? SharePoint Framework? Microsoft Teams? how about Azure, PowerApps, Flow and more??  Come join us for 2 days of awesome learning from the best experts for only $150 March 14-15 2019 at The North American Collaboration Summit.

1 Comment

1 Trackback / Pingback

  1. Notifications on Microsoft Graph with Anthony Leibovitz & Lei Xu – Microsoft 365 Developer Podcast - Office 365 Developer Blog

Comments are closed.