Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)

Microsoft Teams: webpage Authentication inside tab

%3CLINGO-SUB%20id%3D%22lingo-sub-1208455%22%20slang%3D%22en-US%22%3EMicrosoft%20Teams%3A%20webpage%20Authentication%20inside%20tab%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1208455%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20developing%20a%20webapp%20that's%20inside%20a%20tab%20in%20microsoft%20teams.%3C%2FP%3E%3CP%3EThe%20webapp%20uses%20the%20GRAPH%20API%20and%20SharePoint%20API%20to%20retrieve%20data%20from%20sharepoint%20and%20data%20from%20graph.%20I%20need%20to%20use%20both%20api's%20to%20utilise%20all%20the%20resources%20to%20the%20max.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20authenticate%20inside%20the%20microsoft%20teams%20tab%20for%20BOTH%20graph%20and%20sharepoint%3F%20Do%20I%20need%20to%20do%202%20authentications%20so%20I%20have%202%20tokens%3F%20(1%20for%20each%20endpoint)%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOr%20can%20I%20fetch%201%20token%20that%20works%20for%20both%20api's%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1208455%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAuthentication%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraph%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1208486%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%3A%20webpage%20Authentication%20inside%20tab%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1208486%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F494951%22%20target%3D%22_blank%22%3E%40dhaeseleermatthias%3C%2FA%3E%26nbsp%3B-%20If%20you%20are%20using%20two%20different%20services%20then%20you%20need%20to%20get%20two%20tokens.%20You%20could%20take%20a%20look%20at%20Graph%20APIs%20for%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Fsite%3Fview%3Dgraph-rest-1.0%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESharePoint%20sites%3C%2FA%3E%20and%20see%20if%20you%20could%20use%20Graph%20for%20both.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1208522%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%3A%20webpage%20Authentication%20inside%20tab%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1208522%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F79135%22%20target%3D%22_blank%22%3E%40Wajeed%20Hanif%20Shaik%3C%2FA%3E%26nbsp%3BOkay%2C%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

 

I'm developing a webapp that's inside a tab in microsoft teams.

The webapp uses the GRAPH API and SharePoint API to retrieve data from sharepoint and data from graph. I need to use both api's to utilise all the resources to the max.

 

How can I authenticate inside the microsoft teams tab for BOTH graph and sharepoint? Do I need to do 2 authentications so I have 2 tokens? (1 for each endpoint) 

 

Or can I fetch 1 token that works for both api's?

2 Replies

@dhaeseleermatthias - If you are using two different services then you need to get two tokens. You could take a look at Graph APIs for SharePoint sites and see if you could use Graph for both.