{"id":7029,"date":"2021-09-08T12:43:03","date_gmt":"2021-09-08T19:43:03","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=7029"},"modified":"2021-11-15T15:55:15","modified_gmt":"2021-11-15T23:55:15","slug":"announcing-a-new-microsoft-teams-authentication-provider-and-file-upload-feature-in-the-microsoft-graph-toolkit","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/announcing-a-new-microsoft-teams-authentication-provider-and-file-upload-feature-in-the-microsoft-graph-toolkit\/","title":{"rendered":"Announcing a new Microsoft Teams authentication provider and file upload feature in the Microsoft Graph Toolkit"},"content":{"rendered":"<p><span class=\"\" data-contrast=\"auto\">Today,\u00a0thanks to the support and contributions of the community,\u00a0we are excited to\u00a0share\u00a0another new release of the Microsoft Graph Toolkit, version 2.3. This release includes a new Microsoft Teams authentication provider,\u00a0file\u00a0upload\u00a0support\u00a0in the\u00a0File List component, and\u00a0several feature updates and bug fixes!\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">As a recap, the\u00a0<\/span><a href=\"https:\/\/aka.ms\/mgt\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-contrast=\"none\">Microsoft Graph Toolkit<\/span><\/a><span data-contrast=\"auto\">\u00a0is a collection of functional UI components and authentication providers that makes your integration with Microsoft Graph as easy as writing two lines of code. If you\u2019re not familiar with the Toolkit yet, learn more by reading our\u00a0<\/span><a href=\"https:\/\/aka.ms\/mgt-docs\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-contrast=\"none\">documentation<\/span><\/a><span data-contrast=\"auto\">, visiting our\u00a0<\/span><a href=\"https:\/\/mgt.dev\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-contrast=\"none\">component playground<\/span><\/a><span data-contrast=\"auto\">, or following the\u00a0<\/span><a href=\"https:\/\/docs.microsoft.com\/learn\/paths\/m365-msgraph-toolkit\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-contrast=\"none\">Microsoft Graph Toolkit Learn Path<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h4 aria-level=\"1\"><span data-contrast=\"none\">Updating your application<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">To take advantage of the new features, you\u2019ll need to update your application to use the newest version of the Microsoft Graph Toolkit. If you\u2019re using the Toolkit via npm, go to your project directory and run:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<pre class=\"prettyprint\">Npm i @microsoft\/mgt@latest<\/pre>\n<p><span data-contrast=\"auto\">If you\u2019re using the Toolkit via unpkg, your application will automatically be updated to the newest version.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h4><span data-contrast=\"none\">What\u2019s New<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h4>\n<h5>Microsoft Teams authentication provider with support for single sign-on (SSO)<\/h5>\n<p>Version 2.3 includes a brand new Provider,\u00a0<a href=\"https:\/\/docs.microsoft.com\/graph\/toolkit\/providers\/teams-msal2\" target=\"_blank\" rel=\"noopener noreferrer\">TeamsMsal2Provider<\/a>, for authentication in Microsoft Teams applications. Built on top of msal-browser and the more secure Authorization Code Flow with PKCE, this new provider supports both single-sign on and interactive login in your Microsoft Teams tab applications.<\/p>\n<p><b><span data-contrast=\"auto\">What\u2019s the difference between the TeamsProvider and TeamsMsal2Provider?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>The\u00a0<a href=\"https:\/\/docs.microsoft.com\/graph\/toolkit\/providers\/teams\" target=\"_blank\" rel=\"noopener noreferrer\">TeamsProvider<\/a>, built on top of\u00a0<a href=\"https:\/\/github.com\/AzureAD\/microsoft-authentication-library-for-js\" target=\"_blank\" rel=\"noopener noreferrer\">msal.js<\/a>, uses the implicit grant flow and only supports authentication through interactive client-side login. The new\u00a0<a href=\"https:\/\/docs.microsoft.com\/graph\/toolkit\/providers\/teams-msal2\" target=\"_blank\" rel=\"noopener noreferrer\">TeamsMsal2Provider<\/a>, built on top of\u00a0<a href=\"https:\/\/github.com\/AzureAD\/microsoft-authentication-library-for-js\/tree\/dev\/lib\/msal-browser\" target=\"_blank\" rel=\"noopener noreferrer\">msal-browser<\/a>, implements the OAuth 2.0 Authorization code flow with PKCE, which is more secure. Additionally, the TeamsMsal2Provider now supports single sign-on in addition to interactive login.<\/p>\n<p><b><span data-contrast=\"auto\">Why should\u00a0I\u00a0migrate?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Authorization\u00a0Code\u00a0Flow is more secure for web applications than the implicit grant flow used in our original Teams Provider, and we recommend\u00a0using the TeamsMsal2Provider going forward.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Previously, our original Teams\u00a0Provider only provided support for interactive login.\u00a0With the new provider, you are\u00a0able to leverage Single Sign-On\u00a0in\u00a0your Teams application,\u00a0which means if a\u00a0user consents to use your app, they do not have to consent again on another device as they are signed in automatically.\u00a0\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Please note, for SSO, you will need to implement a backend that enables exchanging the Microsoft Teams authentication token with a token that can be used to call Microsoft Graph via the on-behalf-of flow. Take a look at our\u00a0<a href=\"https:\/\/github.com\/microsoftgraph\/microsoft-graph-toolkit\/tree\/main\/samples\/teams-sso-node\" target=\"_blank\" rel=\"noopener noreferrer\">Node SSO Sample<\/a>\u00a0for a reference\u00a0<\/span><span data-contrast=\"auto\">implementation\u00a0of the backend service, and for an\u00a0end-to-end\u00a0example of enabling Single Sign-On with the Microsoft Graph Toolkit in your Microsoft Teams apps.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Will you continue supporting the\u00a0existing\u00a0TeamsProvider?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Yes, as long as\u00a0msal.js\u00a0is supported, we will continue supporting the original Teams Provider.\u00a0However, we do not plan to add any additional features and any new feature development will go in the new TeamsMsal2Provider.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">How do I\u00a0migrate or\u00a0get started\u00a0developing with the new provider?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>Check out our\u00a0<a href=\"https:\/\/docs.microsoft.com\/graph\/toolkit\/providers\/teams-msal2\" target=\"_blank\" rel=\"noopener noreferrer\">Teams MSAL2 Provider documentation<\/a>\u00a0for migration instructions, and our step-by step\u00a0<a href=\"https:\/\/docs.microsoft.com\/graph\/toolkit\/get-started\/build-a-microsoft-teams-tab\" target=\"_blank\" rel=\"noopener noreferrer\">Build a Microsoft Teams Tab<\/a>\u00a0(interactive login) or\u00a0<a href=\"https:\/\/docs.microsoft.com\/graph\/toolkit\/get-started\/build-a-microsoft-teams-sso-tab\" target=\"_blank\" rel=\"noopener noreferrer\">Build a Microsoft Teams SSO Tab<\/a>\u00a0guides to get started with developing an application.<\/p>\n<h5><span data-contrast=\"none\">File upload functionality in the File List component<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:40,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h5>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">We\u2019ve updated our\u00a0<a href=\"https:\/\/docs.microsoft.com\/graph\/toolkit\/components\/file-list\" target=\"_blank\" rel=\"noopener noreferrer\">File List component<\/a>\u00a0<\/span><span data-contrast=\"auto\">to support the uploading of files\u00a0by\u00a0users.\u00a0Now, you can\u00a0display\u00a0a list of files\u00a0and\/or folders\u00a0from One Drive or SharePoint\u00a0and allow users to upload\u00a0items\u00a0from their device\u00a0to that location\u00a0with a\u00a0single attribute.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Below is an example that shows a signed-in user uploading files to their root drive:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/09\/mgt-picker.gif\"><img decoding=\"async\" class=\"aligncenter wp-image-7030 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/09\/mgt-picker.gif\" alt=\"Image mgt picker\" width=\"600\" height=\"752\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<article class=\"post-6638 post type-post status-publish format-standard hentry category-microsoft-graph category-microsoft-teams ms-product-microsoft-365 ms-product-microsoft-teams ms-technologies-graph\">\n<div class=\"entry-content\">\n<p><span class=\"x-hidden-focus\" data-contrast=\"auto\">To try out this new feature, visit the documentation to learn how to use\u00a0<\/span><a href=\"https:\/\/docs.microsoft.com\/graph\/toolkit\/components\/file-list\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-contrast=\"none\">File List<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h4 aria-level=\"1\"><span data-contrast=\"none\">Bug Fixes and Improvements<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h4>\n<p>This release also includes numerous bug fixes and improvements. To see the full list, check out our\u00a0<a href=\"https:\/\/github.com\/microsoftgraph\/microsoft-graph-toolkit\/releases\/tag\/v2.3.0\">release notes<\/a>.<\/p>\n<p><span class=\"x-hidden-focus\" data-contrast=\"auto\">Thank you to everyone who has reported bugs or sent us feature requests since the last release! We are continuously reading your feedback and making improvements to make the Toolkit valuable for our community.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Thank you to those who have contributed features and bug fixes to make this release possible! If you would like to contribute to the Microsoft Graph Toolkit, visit our\u00a0<\/span><a href=\"https:\/\/github.com\/microsoftgraph\/microsoft-graph-toolkit\/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+\" target=\"_blank\" rel=\"noopener noreferrer\"><span data-contrast=\"none\">GitHub issues<\/span><\/a><span data-contrast=\"auto\">\u00a0and look for those tagged with \u201cgood first issue\u201d or \u201chelp wanted\u201d.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>We\u2019re looking forward to hearing your thoughts and feedback on this new release. Please submit any bugs, feature requests, and feedback by opening an issue in our\u00a0<a href=\"https:\/\/aka.ms\/mgt\">GitHub repository<\/a>.<\/p>\n<ul>\n<li data-leveltext=\"-\" data-font=\"Calibri\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"0\" data-aria-level=\"1\"><span data-contrast=\"auto\">The Microsoft Graph Toolkit team<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<\/div>\n<\/article>\n<p>&nbsp;<\/p>\n<div class=\"secondary widget-area\" data-grid=\"col-4\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today,\u00a0thanks to the support and contributions of the community,\u00a0we are excited to\u00a0share\u00a0another new release of the Microsoft Graph Toolkit, version 2.3. This release includes a new Microsoft Teams authentication provider,\u00a0file\u00a0upload\u00a0support\u00a0in the\u00a0File List component, and\u00a0several feature updates and bug fixes!\u00a0\u00a0<\/p>\n","protected":false},"author":69095,"featured_media":7034,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3,128],"tags":[34,93],"class_list":["post-7029","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","category-microsoft-teams","tag-microsoft-graph-toolkit","tag-msal"],"acf":[],"blog_post_summary":"<p>Today,\u00a0thanks to the support and contributions of the community,\u00a0we are excited to\u00a0share\u00a0another new release of the Microsoft Graph Toolkit, version 2.3. This release includes a new Microsoft Teams authentication provider,\u00a0file\u00a0upload\u00a0support\u00a0in the\u00a0File List component, and\u00a0several feature updates and bug fixes!\u00a0\u00a0<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/7029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69095"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=7029"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/7029\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/7034"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=7029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=7029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=7029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}