SOLVED

Is there a way to store/retrieve persistent data in Teams tab?

%3CLINGO-SUB%20id%3D%22lingo-sub-1544749%22%20slang%3D%22en-US%22%3EIs%20there%20a%20way%20to%20store%2Fretrieve%20persistent%20data%20in%20Teams%20tab%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1544749%22%20slang%3D%22en-US%22%3E%3CP%3EWhat%20is%20the%20simplest%20way%20to%20store%20persistent%20data%20in%20my%20Teams%20app%20tab%3F%20I%20have%20an%20integer%20value%2C%20which%20I%20would%20like%20to%20maintain%20in%20one%20of%20my%20tabs.%20This%20value%20can%20change%20so%20I%20need%20some%20way%20of%20storing%20it.%20I%20would%20like%20the%20ability%20to%20retrieve%20this%20value%20in%20my%20tab%20after%20Teams%20is%20restarted.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20possible%3F%20Can%20someone%20point%20me%20to%20a%20snippet%20of%20code%2C%20which%20stores%20and%20retrieves%20persistent%20data%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1544749%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1547126%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20a%20way%20to%20store%2Fretrieve%20persistent%20data%20in%20Teams%20tab%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1547126%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F721379%22%20target%3D%22_blank%22%3E%40George71%3C%2FA%3E%26nbsp%3BYou%20can%20use%20Get%20Context%20for%20your%20tab%2C%20this%20will%20return%20the%20tab%20context%20data%2C%20if%20you%20are%20willing%20to%20pass%20this%20value%20in%20tab%20URL%20you%20can%20also%20do%20that%2C%20you%20will%20get%20that%20for%20sure.%20Please%20look%20at%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Ftabs%2Fhow-to%2Faccess-teams-context%23getting-context-by-using-the-microsoft-teams-javascript-library%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eget%20context%20for%20your%20tab%20using%20Teams%20client%20SDK%3C%2FA%3E.%20You%20can%20also%20use%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Ftabs%2Fhow-to%2Fcreate-tab-pages%2Fconfiguration-page%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EgetSetting%20and%20setSetting%3C%2FA%3E%20method%20for%20creating%20a%20configuration%20page.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1558475%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20a%20way%20to%20store%2Fretrieve%20persistent%20data%20in%20Teams%20tab%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1558475%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20advice.%26nbsp%3B%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1558479%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20a%20way%20to%20store%2Fretrieve%20persistent%20data%20in%20Teams%20tab%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1558479%22%20slang%3D%22en-US%22%3EThanks%20for%20your%20advice.%20%3A)%3C%2Fimg%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

What is the simplest way to store persistent data in my Teams app tab? I have an integer value, which I would like to maintain in one of my tabs. This value can change so I need some way of storing it. I would like the ability to retrieve this value in my tab after Teams is restarted.

 

Is this possible? Can someone point me to a snippet of code, which stores and retrieves persistent data?

 

Thanks.

 

2 Replies
Highlighted
Best Response confirmed by George71 (Occasional Contributor)
Solution

@George71 You can use Get Context for your tab, this will return the tab context data, if you are willing to pass this value in tab URL you can also do that, you will get that for sure. Please look at get context for your tab using Teams client SDK. You can also use getSetting and setSetting method for creating a configuration page.

Highlighted
Thanks for your advice. :)