Home
%3CLINGO-SUB%20id%3D%22lingo-sub-263641%22%20slang%3D%22en-US%22%3EIgnite%20Live%20Blog%3A%20Session%20THR2227%20-%20Surfacing%20SPFx%20Solutions%20in%20SharePoint%20and%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-263641%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId-1650217540%22%20id%3D%22toc-hId-1701967304%22%3EBuild%20once%2C%20run%20everywhere%3C%2FH2%3E%0A%3CP%3EMicrosoft%20has%20presented%20a%20clear%20and%20consistent%20message%20in%20its%20developer-focused%20sessions%20at%20Microsoft%20Ignite%3A%20developers%20who%20build%20solutions%20for%20the%20Office%20365%20ecosystem%20will%20soon%20be%20able%20to%20%3CSTRONG%3Ebuild%20one%20solution%20and%20deploy%20it%20to%20a%20common%20runtime%20that%20spans%20multiple%20Office%20365%20apps%3C%2FSTRONG%3E%2C%20beginning%20with%20SharePoint%20and%20Teams%20and%20ultimately%20adding%20support%20for%26nbsp%3Ball%20of%20Office.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20564px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F55211i9632A37A093EC0D1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22arch.png%22%20title%3D%22arch.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20provides%20distinct%20advantages%20for%203%20key%20Office%20365%20consumers%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFor%26nbsp%3B%3CSTRONG%3EEnd%20Users%3C%2FSTRONG%3E%2C%20apps%20and%20information%20are%20available%20everywhere%20they%20work%2C%20regardless%20of%20the%20tool%3C%2FLI%3E%0A%3CLI%3EFor%26nbsp%3B%3CSTRONG%3EIT%20Admins%3C%2FSTRONG%3E%2C%20managing%20deployment%20and%20distribution%20of%20custom%20applications%20is%20streamlined%20and%20simplified%3C%2FLI%3E%0A%3CLI%3EFor%26nbsp%3B%3CSTRONG%3EDevelopers%3C%2FSTRONG%3E%2C%20one%20solution%20can%20reach%20multiple%20workloads%20(for%20example%2C%20SharePoint%20and%20Teams)%20and%20developers%20can%20apply%20a%20single%20set%20of%20development%20concepts%20and%20experiences%20to%20build%20apps%20across%20the%20entire%20Office%20365%20ecosystem%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc-hId--901939421%22%20id%3D%22toc-hId--850189657%22%3EIn%20practice%3C%2FH2%3E%0A%3CP%3EA%20simple%20example%20(demoed%20in%20this%20session%20and%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwictorwilen%2Fspfxinteams%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eavailable%20in%20GitHub%20here%3C%2FA%3E)%20might%20cover%20the%20following%20scenario%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EA%20developer%20builds%20an%20application%20as%20a%20SharePoint%20Framework%20web%20part%2C%20harnessing%20the%20Microsoft%20Graph%20to%26nbsp%3Badd%20new%20events%20to%20the%20end%20user's%20Outlook%20(Exchange)%20calendar%3C%2FLI%3E%0A%3CLI%3EThe%20developer%20targets%26nbsp%3B%3CSTRONG%3Eboth%3C%2FSTRONG%3E%20SharePoint%20and%20Microsoft%20Teams%20by%20configuring%20the%26nbsp%3B%3CEM%3Emanifests.json%3C%2FEM%3E%20file%3C%2FLI%3E%0A%3CLI%3EOn%20build%2C%20the%20Yeoman%20generator%20builds%20and%20deploys%20(1)%20a%20SharePoint%20Framework%20web%20part%20that%20users%20can%20add%20to%20SharePoint%20pages%2C%20and%20(2)%20a%20Microsoft%20Teams%20App%20Package%20that%20users%20can%20add%20as%20tabs%20to%20channels%20in%20Microsoft%20Teams%3C%2FLI%3E%0A%3CLI%3EAt%20configuration%20time%20(when%20the%20end%20user%20adds%20the%20web%20part%20to%20a%20SharePoint%20page%20or%20adds%20the%20Teams%20app%20as%20a%20tab%20to%20a%20channel)%2C%20the%20configuration%20screen%20for%20the%20Teams%20tab%20mimics%20that%20of%20the%20configuration%20panel%20for%20the%20SharePoint%20web%20part--%20because%20it's%20the%20same%20code!%3C%2FLI%3E%0A%3CLI%3EAt%20runtime%2C%20the%20app%20can%20determine%20its%20context--%20for%20example%2C%20retrieve%20information%20about%20the%20%3CSTRONG%3Esite%20and%20page%3C%2FSTRONG%3E%20in%20which%20the%20SharePoint%20Framework%20web%20part%20is%20running%2C%20or%20the%20%3CSTRONG%3Echannel%3C%2FSTRONG%3E%20to%20which%20the%20Microsoft%20Teams%20app%20has%20been%20added--%20and%20provide%20an%20adaptive%20user%20experience%20based%20on%20that%20context.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20974px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F54785iD747A842A5206C73%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222018-09-27_12-29-24.png%22%20title%3D%222018-09-27_12-29-24.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ETL%3BDR%3A%20Build%20once%2C%20deploy%20and%20run%20everywhere.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-840870914%22%20id%3D%22toc-hId-892620678%22%3EA%20quick%20look%20at%20the%20relevant%20code%3C%2FH2%3E%0A%3CP%3EI%20won't%20dive%20into%20the%20ins%20and%20outs%20of%20all%20of%20Wictor's%20code%20here%20(feel%20free%20to%20check%20out%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwictorwilen%2Fspfxinteams%2Fblob%2Fmaster%2FREADME.md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EReadme.md%20in%20his%20repo%3C%2FA%3E)%2C%20but%20there%20are%20a%20few%20important%20pieces%20to%20pull%20out%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1907799552%22%20id%3D%22toc-hId--1856049788%22%3EPackaging%20the%20SPFx%20web%20part%20for%20Teams%3C%2FH3%3E%0A%3CP%3EFirst%2C%20Wictor%20built%20a%20SharePoint%20Framework%20web%20part%20using%20the%20SPFx%20Yeoman%20generator%20(source%20is%20in%20the%26nbsp%3B%3CEM%3Espfx%26nbsp%3B%3C%2FEM%3Efolder).%26nbsp%3B%20Next%2C%20Wictor%20generated%20a%20Teams%20app%20with%20the%20Teams%20Yeoman%20generator%20(source%20is%20in%20the%26nbsp%3B%3CEM%3Eteams%3C%2FEM%3E%20folder).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20233px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F54795i45DC3B3450D47EB2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222018-09-27_13-34-38.png%22%20title%3D%222018-09-27_13-34-38.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENext%2C%20he%20updated%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwictorwilen%2Fspfxinteams%2Fblob%2Fmaster%2Fteams%2Fsrc%2Fmanifest%2Fmanifest.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CEM%3Emanifest.json%3C%2FEM%3E%20file%20in%20the%26nbsp%3B%3CEM%3E%2Fteams%2Fsrc%2Fmanifest%2F%26nbsp%3B%3C%2FEM%3E%3C%2FA%3Efolder%20to%20include%20the%20unique%20Id%20and%20path%20of%20the%20SPFx%20web%20part%20(note%20that%20the%20URL%20will%20change%20when%20this%20capability%20goes%20GA)%3A%3C%2FP%3E%0A%3CPRE%3E%20%22configurableTabs%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22configurationUrl%22%3A%20%22https%3A%2F%2Fspoppe-a.akamaihd.net%2Ffiles%2Fsp-client-master_20180727.004%2Fsp-teams-tab%2Fsp-teams-tab.html%3Fdest%3D%2F_layouts%2F15%2Fwebpart.aspx%3FopenPropertyPane%3Dtrue%26amp%3Bteams%26amp%3BcomponentId%3D374bc334-0a1f-4cbc-82a6-4d87f71e6976%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22canUpdateConfiguration%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22scopes%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22team%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%20%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%2C%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWictor%20was%20then%20able%20to%20build%20and%20deploy%20the%20same%20app%20as%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EA%20web%20part%20in%20SharePoint%2C%20and%3C%2FLI%3E%0A%3CLI%3EAn%20app%20in%20Teams.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--164989217%22%20id%3D%22toc-hId--113239453%22%3EReacting%20to%20the%26nbsp%3Bapp%20context%20at%20runtime%3C%2FH3%3E%0A%3CP%3EIn%20the%20main%20app%20code%2C%20Wictor%20wrote%20a%20quick%20method%20to%20check%20if%20the%20user%20context%20was%20in%20Microsoft%20Teams%3A%3C%2FP%3E%0A%3CPRE%3Eprivate%20isInTeams()%3A%20boolean%20%7B%0A%20%20%20%20return%20(%26lt%3Bany%26gt%3Bthis.context.pageContext).teams%20!%3D%3D%20undefined%3B%0A%20%20%7D%3C%2FPRE%3E%0A%3CP%3EHe%20then%20used%20this%20throughout%20the%20app%20code%2C%26nbsp%3Bperforming%20some%20different%20actions%20at%20runtime%20if%20a%20Teams%20context%20was%20detected%3A%3C%2FP%3E%0A%3CPRE%3Eif%20(this.isInTeams())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20if%20we're%20in%20Teams%20we%20already%20know%20the%20channel%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20channel%20%3D%20(%26lt%3Bany%26gt%3Bthis.context.pageContext).teams.channelId%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20we're%20not%20in%20Teams%20then%20use%20the%20channel%20submitted%20in%20the%20action%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20channel%20%3D%20(%26lt%3Bany%26gt%3BsubmitAction.data).channel%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%3C%2FPRE%3E%0A%3CH2%20id%3D%22toc-hId-1774334623%22%20id%3D%22toc-hId-1826084387%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--777822338%22%20id%3D%22toc-hId--726072574%22%3ETakeaways%3C%2FH2%3E%0A%3CP%3EThis%20is%20the%20first%20step%20in%20a%20very%20important%20journey%20for%20developers%20on%20the%20Office%20365%20ecosystem%2C%20including%20SharePoint%20and%20Teams%20but%20eventually%20extending%20to%20the%20rest%20of%20Office.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20cross-pollination%20between%20SharePoint%20and%20Teams%20developer%20toolchains%2C%20developers%20can%26nbsp%3Bcreate%20great%20user%20experiences%26nbsp%3Bbuilt%20on%20the%20Microsoft%20Graph%20and%20deploy%20them%20as%20SharePoint%20SPFx%20web%20parts%20and%20Microsoft%20Teams%20apps%20(tabs)%20from%20a%20single%20codebase.%26nbsp%3B%20And%20these%20applications%20are%20context-aware%2C%20providing%20developers%20even%20more%20opportunities%20to%20delight%20end%20users%20by%20incorporating%20unique%20app%20context%20into%20the%20user%20experience.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-964987997%22%20id%3D%22toc-hId-1016737761%22%3EResources%20%26amp%3B%20next%20steps%3C%2FH2%3E%0A%3CUL%3E%0A%3CLI%3EView%20session%20details%20on%20the%20Ignite%20portal%3A%20%3CA%20href%3D%22https%3A%2F%2Fmyignite.techcommunity.microsoft.com%2Fsessions%2F66052%3Fsource%3Dschedule%23ignite-html-anchor%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESession%20details%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3ECheck%20out%20the%20source%20code%20for%20Wictor's%20demo%3A%26nbsp%3B%3CA%20title%3D%22Sample%20code%20on%20GitHub%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fwictorwilen%2Fspfxinteams%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESample%20code%20on%20GitHub%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EWatch%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-docs%2Fwiki%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESharePoint%20Framework%20GitHub%20page%3C%2FA%3E%20for%20v1.7%20release%2C%20which%20will%20include%20the%20functionality%20in%20Wictor's%20code%3C%2FLI%3E%0A%3CLI%3ETake%20a%20look%20at%20the%20S%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Froadmap%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EharePoint%20Framework%20public%20roadmap%3C%2FA%3E%2C%20which%20outlines%20features%20you%20can%20expect%20to%20find%20in%20upcoming%20releases%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-263641%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F54775iE9D8AA0FC903FDDB%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222018-09-27_11-18-06.png%22%20title%3D%222018-09-27_11-18-06.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWith%20the%20new%20Teams%20functionality%20in%20the%20SharePoint%20Framework%2C%20developers%20can%20now%20build%20applications%20using%20the%20SharePoint%20Framework%20(SPFx)%20and%20target%20them%20for%20deployment%20to%26nbsp%3BSharePoint%20AND%26nbsp%3BMicrosoft%20Teams.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20enables%20new%2C%20streamlined%20scenarios%20where%20Office%20365%20developers%20can%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EBuild%20ONE%20solution%20on%20the%20SharePoint%20Framework%3C%2FLI%3E%0A%3CLI%3EDeploy%20to%20SharePoint%20as%20web%20part%3C%2FLI%3E%0A%3CLI%3EDeploy%20to%20Teams%20as%20an%20App%3C%2FLI%3E%0A%3CLI%3EAdjust%20app%20functionality%20to%20take%20advantage%20of%20environment-specific%20context%2C%20such%20as%20site%20context%20in%20SharePoint%20or%20channel%20context%20in%20Teams%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIn%20their%20session%20%22Surfacing%20SPFx%20Solutions%20in%20SharePoint%20and%20Teams%22%2C%20Larry%20Jin%20(%3CSPAN%3ESenior%20PM%20Manager%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%3E%3CA%20class%3D%22c-hyperlink%22%20target%3D%22_blank%22%3EMicrosoft%3C%2FA%3E%3C%2FSPAN%3E)%2C%20Wictor%20Wilen%20(MVP)%20and%20Suzanne%20George%20(Cognizant)%20discuss%20the%20benefits%20of%20a%20%22build%20once%2C%20deploy%20anywhere%22%20development%20approach%20in%20Office%20365%20and%20demoed%20examples%20of%20building%20context-aware%20apps%20on%20the%20SharePoint%20Framework%20and%20deploying%20them%20to%20SharePoint%20and%20Teams.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-263641%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIgnite%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-265483%22%20slang%3D%22en-US%22%3ERe%3A%20Ignite%20Live%20Blog%3A%20Session%20THR2227%20-%20Surfacing%20SPFx%20Solutions%20in%20SharePoint%20and%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-265483%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.tainug.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ewww.tainug.com%3C%2FA%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F7823%22%20target%3D%22_blank%22%3E%40Christopher%20Johnson%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CH2%20id%3D%22toc-hId-1650217540%22%20id%3D%22toc-hId--1535419200%22%3EBuild%20once%2C%20run%20everywhere%3C%2FH2%3E%3CP%3EMicrosoft%20has%20presented%20a%20clear%20and%20consistent%20message%20in%20its%20developer-focused%20sessions%20at%20Microsoft%20Ignite%3A%20developers%20who%20build%20solutions%20for%20the%20Office%20365%20ecosystem%20will%20soon%20be%20able%20to%20%3CSTRONG%3Ebuild%20one%20solution%20and%20deploy%20it%20to%20a%20common%20runtime%20that%20spans%20multiple%20Office%20365%20apps%3C%2FSTRONG%3E%2C%20beginning%20with%20SharePoint%20and%20Teams%20and%20ultimately%20adding%20support%20for%26nbsp%3Ball%20of%20Office.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20564px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F55211i9632A37A093EC0D1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22arch.png%22%20title%3D%22arch.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20provides%20distinct%20advantages%20for%203%20key%20Office%20365%20consumers%3A%3C%2FP%3E%3CUL%3E%3CLI%3EFor%26nbsp%3B%3CSTRONG%3EEnd%20Users%3C%2FSTRONG%3E%2C%20apps%20and%20information%20are%20available%20everywhere%20they%20work%2C%20regardless%20of%20the%20tool%3C%2FLI%3E%3CLI%3EFor%26nbsp%3B%3CSTRONG%3EIT%20Admins%3C%2FSTRONG%3E%2C%20managing%20deployment%20and%20distribution%20of%20custom%20applications%20is%20streamlined%20and%20simplified%3C%2FLI%3E%3CLI%3EFor%26nbsp%3B%3CSTRONG%3EDevelopers%3C%2FSTRONG%3E%2C%20one%20solution%20can%20reach%20multiple%20workloads%20(for%20example%2C%20SharePoint%20and%20Teams)%20and%20developers%20can%20apply%20a%20single%20set%20of%20development%20concepts%20and%20experiences%20to%20build%20apps%20across%20the%20entire%20Office%20365%20ecosystem%3C%2FLI%3E%3C%2FUL%3E%3CH2%20id%3D%22toc-hId--901939421%22%20id%3D%22toc-hId-207391135%22%3EIn%20practice%3C%2FH2%3E%3CP%3EA%20simple%20example%20(demoed%20in%20this%20session%20and%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwictorwilen%2Fspfxinteams%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eavailable%20in%20GitHub%20here%3C%2FA%3E)%20might%20cover%20the%20following%20scenario%3A%3C%2FP%3E%3COL%3E%3CLI%3EA%20developer%20builds%20an%20application%20as%20a%20SharePoint%20Framework%20web%20part%2C%20harnessing%20the%20Microsoft%20Graph%20to%26nbsp%3Badd%20new%20events%20to%20the%20end%20user's%20Outlook%20(Exchange)%20calendar%3C%2FLI%3E%3CLI%3EThe%20developer%20targets%26nbsp%3B%3CSTRONG%3Eboth%3C%2FSTRONG%3E%20SharePoint%20and%20Microsoft%20Teams%20by%20configuring%20the%26nbsp%3B%3CEM%3Emanifests.json%3C%2FEM%3E%20file%3C%2FLI%3E%3CLI%3EOn%20build%2C%20the%20Yeoman%20generator%20builds%20and%20deploys%20(1)%20a%20SharePoint%20Framework%20web%20part%20that%20users%20can%20add%20to%20SharePoint%20pages%2C%20and%20(2)%20a%20Microsoft%20Teams%20App%20Package%20that%20users%20can%20add%20as%20tabs%20to%20channels%20in%20Microsoft%20Teams%3C%2FLI%3E%3CLI%3EAt%20configuration%20time%20(when%20the%20end%20user%20adds%20the%20web%20part%20to%20a%20SharePoint%20page%20or%20adds%20the%20Teams%20app%20as%20a%20tab%20to%20a%20channel)%2C%20the%20configuration%20screen%20for%20the%20Teams%20tab%20mimics%20that%20of%20the%20configuration%20panel%20for%20the%20SharePoint%20web%20part--%20because%20it's%20the%20same%20code!%3C%2FLI%3E%3CLI%3EAt%20runtime%2C%20the%20app%20can%20determine%20its%20context--%20for%20example%2C%20retrieve%20information%20about%20the%20%3CSTRONG%3Esite%20and%20page%3C%2FSTRONG%3E%20in%20which%20the%20SharePoint%20Framework%20web%20part%20is%20running%2C%20or%20the%20%3CSTRONG%3Echannel%3C%2FSTRONG%3E%20to%20which%20the%20Microsoft%20Teams%20app%20has%20been%20added--%20and%20provide%20an%20adaptive%20user%20experience%20based%20on%20that%20context.%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20974px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F54785iD747A842A5206C73%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222018-09-27_12-29-24.png%22%20title%3D%222018-09-27_12-29-24.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ETL%3BDR%3A%20Build%20once%2C%20deploy%20and%20run%20everywhere.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId-840870914%22%20id%3D%22toc-hId--1459489261%22%3EA%20quick%20look%20at%20the%20relevant%20code%3C%2FH2%3E%3CP%3EI%20won't%20dive%20into%20the%20ins%20and%20outs%20of%20all%20of%20Wictor's%20code%20here%20(feel%20free%20to%20check%20out%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwictorwilen%2Fspfxinteams%2Fblob%2Fmaster%2FREADME.md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EReadme.md%20in%20his%20repo%3C%2FA%3E)%2C%20but%20there%20are%20a%20few%20important%20pieces%20to%20pull%20out%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CH3%20id%3D%22toc-hId--1907799552%22%20id%3D%22toc-hId--1513630285%22%3EPackaging%20the%20SPFx%20web%20part%20for%20Teams%3C%2FH3%3E%3CP%3EFirst%2C%20Wictor%20built%20a%20SharePoint%20Framework%20web%20part%20using%20the%20SPFx%20Yeoman%20generator%20(source%20is%20in%20the%26nbsp%3B%3CEM%3Espfx%26nbsp%3B%3C%2FEM%3Efolder).%26nbsp%3B%20Next%2C%20Wictor%20generated%20a%20Teams%20app%20with%20the%20Teams%20Yeoman%20generator%20(source%20is%20in%20the%26nbsp%3B%3CEM%3Eteams%3C%2FEM%3E%20folder).%3C%2FP%3E%3CP%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20233px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F54795i45DC3B3450D47EB2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222018-09-27_13-34-38.png%22%20title%3D%222018-09-27_13-34-38.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ENext%2C%20he%20updated%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwictorwilen%2Fspfxinteams%2Fblob%2Fmaster%2Fteams%2Fsrc%2Fmanifest%2Fmanifest.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CEM%3Emanifest.json%3C%2FEM%3E%20file%20in%20the%26nbsp%3B%3CEM%3E%2Fteams%2Fsrc%2Fmanifest%2F%26nbsp%3B%3C%2FEM%3E%3C%2FA%3Efolder%20to%20include%20the%20unique%20Id%20and%20path%20of%20the%20SPFx%20web%20part%20(note%20that%20the%20URL%20will%20change%20when%20this%20capability%20goes%20GA)%3A%3C%2FP%3E%3CPRE%3E%20%22configurableTabs%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22configurationUrl%22%3A%20%22https%3A%2F%2Fspoppe-a.akamaihd.net%2Ffiles%2Fsp-client-master_20180727.004%2Fsp-teams-tab%2Fsp-teams-tab.html%3Fdest%3D%2F_layouts%2F15%2Fwebpart.aspx%3FopenPropertyPane%3Dtrue%26amp%3Bteams%26amp%3BcomponentId%3D374bc334-0a1f-4cbc-82a6-4d87f71e6976%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22canUpdateConfiguration%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22scopes%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22team%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%20%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%2C%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWictor%20was%20then%20able%20to%20build%20and%20deploy%20the%20same%20app%20as%3A%3C%2FP%3E%3COL%3E%3CLI%3EA%20web%20part%20in%20SharePoint%2C%20and%3C%2FLI%3E%3CLI%3EAn%20app%20in%20Teams.%26nbsp%3B%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CH3%20id%3D%22toc-hId--164989217%22%20id%3D%22toc-hId-229180050%22%3EReacting%20to%20the%26nbsp%3Bapp%20context%20at%20runtime%3C%2FH3%3E%3CP%3EIn%20the%20main%20app%20code%2C%20Wictor%20wrote%20a%20quick%20method%20to%20check%20if%20the%20user%20context%20was%20in%20Microsoft%20Teams%3A%3C%2FP%3E%3CPRE%3Eprivate%20isInTeams()%3A%20boolean%20%7B%0A%20%20%20%20return%20(%26lt%3Bany%26gt%3Bthis.context.pageContext).teams%20!%3D%3D%20undefined%3B%0A%20%20%7D%3C%2FPRE%3E%3CP%3EHe%20then%20used%20this%20throughout%20the%20app%20code%2C%26nbsp%3Bperforming%20some%20different%20actions%20at%20runtime%20if%20a%20Teams%20context%20was%20detected%3A%3C%2FP%3E%3CPRE%3Eif%20(this.isInTeams())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20if%20we're%20in%20Teams%20we%20already%20know%20the%20channel%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20channel%20%3D%20(%26lt%3Bany%26gt%3Bthis.context.pageContext).teams.channelId%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20we're%20not%20in%20Teams%20then%20use%20the%20channel%20submitted%20in%20the%20action%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20channel%20%3D%20(%26lt%3Bany%26gt%3BsubmitAction.data).channel%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3C%2FPRE%3E%3CH2%20id%3D%22toc-hId-1774334623%22%20id%3D%22toc-hId--526025552%22%3E%26nbsp%3B%3C%2FH2%3E%3CH2%20id%3D%22toc-hId--777822338%22%20id%3D%22toc-hId-1216784783%22%3ETakeaways%3C%2FH2%3E%3CP%3EThis%20is%20the%20first%20step%20in%20a%20very%20important%20journey%20for%20developers%20on%20the%20Office%20365%20ecosystem%2C%20including%20SharePoint%20and%20Teams%20but%20eventually%20extending%20to%20the%20rest%20of%20Office.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20cross-pollination%20between%20SharePoint%20and%20Teams%20developer%20toolchains%2C%20developers%20can%26nbsp%3Bcreate%20great%20user%20experiences%26nbsp%3Bbuilt%20on%20the%20Microsoft%20Graph%20and%20deploy%20them%20as%20SharePoint%20SPFx%20web%20parts%20and%20Microsoft%20Teams%20apps%20(tabs)%20from%20a%20single%20codebase.%26nbsp%3B%20And%20these%20applications%20are%20context-aware%2C%20providing%20developers%20even%20more%20opportunities%20to%20delight%20end%20users%20by%20incorporating%20unique%20app%20context%20into%20the%20user%20experience.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId-964987997%22%20id%3D%22toc-hId--1335372178%22%3EResources%20%26amp%3B%20next%20steps%3C%2FH2%3E%3CUL%3E%3CLI%3EView%20session%20details%20on%20the%20Ignite%20portal%3A%20%3CA%20href%3D%22https%3A%2F%2Fmyignite.techcommunity.microsoft.com%2Fsessions%2F66052%3Fsource%3Dschedule%23ignite-html-anchor%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESession%20details%3C%2FA%3E%3C%2FLI%3E%3CLI%3ECheck%20out%20the%20source%20code%20for%20Wictor's%20demo%3A%26nbsp%3B%3CA%20title%3D%22Sample%20code%20on%20GitHub%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fwictorwilen%2Fspfxinteams%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESample%20code%20on%20GitHub%3C%2FA%3E%3C%2FLI%3E%3CLI%3EWatch%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-docs%2Fwiki%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESharePoint%20Framework%20GitHub%20page%3C%2FA%3E%20for%20v1.7%20release%2C%20which%20will%20include%20the%20functionality%20in%20Wictor's%20code%3C%2FLI%3E%3CLI%3ETake%20a%20look%20at%20the%20S%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Froadmap%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EharePoint%20Framework%20public%20roadmap%3C%2FA%3E%2C%20which%20outlines%20features%20you%20can%20expect%20to%20find%20in%20upcoming%20releases%3C%2FLI%3E%3C%2FUL%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Senior Member

Build once, run everywhere

Microsoft has presented a clear and consistent message in its developer-focused sessions at Microsoft Ignite: developers who build solutions for the Office 365 ecosystem will soon be able to build one solution and deploy it to a common runtime that spans multiple Office 365 apps, beginning with SharePoint and Teams and ultimately adding support for all of Office.

 

arch.png

 

This provides distinct advantages for 3 key Office 365 consumers:

  • For End Users, apps and information are available everywhere they work, regardless of the tool
  • For IT Admins, managing deployment and distribution of custom applications is streamlined and simplified
  • For Developers, one solution can reach multiple workloads (for example, SharePoint and Teams) and developers can apply a single set of development concepts and experiences to build apps across the entire Office 365 ecosystem

In practice

A simple example (demoed in this session and available in GitHub here) might cover the following scenario:

  1. A developer builds an application as a SharePoint Framework web part, harnessing the Microsoft Graph to add new events to the end user's Outlook (Exchange) calendar
  2. The developer targets both SharePoint and Microsoft Teams by configuring the manifests.json file
  3. On build, the Yeoman generator builds and deploys (1) a SharePoint Framework web part that users can add to SharePoint pages, and (2) a Microsoft Teams App Package that users can add as tabs to channels in Microsoft Teams
  4. At configuration time (when the end user adds the web part to a SharePoint page or adds the Teams app as a tab to a channel), the configuration screen for the Teams tab mimics that of the configuration panel for the SharePoint web part-- because it's the same code!
  5. At runtime, the app can determine its context-- for example, retrieve information about the site and page in which the SharePoint Framework web part is running, or the channel to which the Microsoft Teams app has been added-- and provide an adaptive user experience based on that context.

2018-09-27_12-29-24.png

TL;DR: Build once, deploy and run everywhere.

 

A quick look at the relevant code

I won't dive into the ins and outs of all of Wictor's code here (feel free to check out the Readme.md in his repo), but there are a few important pieces to pull out:

 

Packaging the SPFx web part for Teams

First, Wictor built a SharePoint Framework web part using the SPFx Yeoman generator (source is in the spfx folder).  Next, Wictor generated a Teams app with the Teams Yeoman generator (source is in the teams folder).

 2018-09-27_13-34-38.png

Next, he updated the manifest.json file in the /teams/src/manifest/ folder to include the unique Id and path of the SPFx web part (note that the URL will change when this capability goes GA):

 "configurableTabs": [
        {
            "configurationUrl": "https://spoppe-a.akamaihd.net/files/sp-client-master_20180727.004/sp-teams-tab/sp-teams-tab.html?dest=/_layouts/15/webpart.aspx?openPropertyPane=true&teams&componentId=374bc334-0a1f-4cbc-82a6-4d87f71e6976",
            "canUpdateConfiguration": true,
            "scopes": [
              "team"
            ] 
        }
    ],

 

Wictor was then able to build and deploy the same app as:

  1. A web part in SharePoint, and
  2. An app in Teams. 

 

Reacting to the app context at runtime

In the main app code, Wictor wrote a quick method to check if the user context was in Microsoft Teams:

private isInTeams(): boolean {
    return (<any>this.context.pageContext).teams !== undefined;
  }

He then used this throughout the app code, performing some different actions at runtime if a Teams context was detected:

if (this.isInTeams()) {
                    // if we're in Teams we already know the channel
                    channel = (<any>this.context.pageContext).teams.channelId;
                  } else {
                    // If we're not in Teams then use the channel submitted in the action
                    channel = (<any>submitAction.data).channel;
                  }

 

Takeaways

This is the first step in a very important journey for developers on the Office 365 ecosystem, including SharePoint and Teams but eventually extending to the rest of Office.

 

With cross-pollination between SharePoint and Teams developer toolchains, developers can create great user experiences built on the Microsoft Graph and deploy them as SharePoint SPFx web parts and Microsoft Teams apps (tabs) from a single codebase.  And these applications are context-aware, providing developers even more opportunities to delight end users by incorporating unique app context into the user experience.

 

Resources & next steps

1 Comment
Deleted
Not applicable

www.tainug.com


@Christopher Johnson wrote:

Build once, run everywhere

Microsoft has presented a clear and consistent message in its developer-focused sessions at Microsoft Ignite: developers who build solutions for the Office 365 ecosystem will soon be able to build one solution and deploy it to a common runtime that spans multiple Office 365 apps, beginning with SharePoint and Teams and ultimately adding support for all of Office.

 

arch.png

 

This provides distinct advantages for 3 key Office 365 consumers:

  • For End Users, apps and information are available everywhere they work, regardless of the tool
  • For IT Admins, managing deployment and distribution of custom applications is streamlined and simplified
  • For Developers, one solution can reach multiple workloads (for example, SharePoint and Teams) and developers can apply a single set of development concepts and experiences to build apps across the entire Office 365 ecosystem

In practice

A simple example (demoed in this session and available in GitHub here) might cover the following scenario:

  1. A developer builds an application as a SharePoint Framework web part, harnessing the Microsoft Graph to add new events to the end user's Outlook (Exchange) calendar
  2. The developer targets both SharePoint and Microsoft Teams by configuring the manifests.json file
  3. On build, the Yeoman generator builds and deploys (1) a SharePoint Framework web part that users can add to SharePoint pages, and (2) a Microsoft Teams App Package that users can add as tabs to channels in Microsoft Teams
  4. At configuration time (when the end user adds the web part to a SharePoint page or adds the Teams app as a tab to a channel), the configuration screen for the Teams tab mimics that of the configuration panel for the SharePoint web part-- because it's the same code!
  5. At runtime, the app can determine its context-- for example, retrieve information about the site and page in which the SharePoint Framework web part is running, or the channel to which the Microsoft Teams app has been added-- and provide an adaptive user experience based on that context.

2018-09-27_12-29-24.png

TL;DR: Build once, deploy and run everywhere.

 

A quick look at the relevant code

I won't dive into the ins and outs of all of Wictor's code here (feel free to check out the Readme.md in his repo), but there are a few important pieces to pull out:

 

Packaging the SPFx web part for Teams

First, Wictor built a SharePoint Framework web part using the SPFx Yeoman generator (source is in the spfx folder).  Next, Wictor generated a Teams app with the Teams Yeoman generator (source is in the teams folder).

 2018-09-27_13-34-38.png

Next, he updated the manifest.json file in the /teams/src/manifest/ folder to include the unique Id and path of the SPFx web part (note that the URL will change when this capability goes GA):

 "configurableTabs": [
        {
            "configurationUrl": "https://spoppe-a.akamaihd.net/files/sp-client-master_20180727.004/sp-teams-tab/sp-teams-tab.html?dest=/_layouts/15/webpart.aspx?openPropertyPane=true&teams&componentId=374bc334-0a1f-4cbc-82a6-4d87f71e6976",
            "canUpdateConfiguration": true,
            "scopes": [
              "team"
            ] 
        }
    ],

 

Wictor was then able to build and deploy the same app as:

  1. A web part in SharePoint, and
  2. An app in Teams. 

 

Reacting to the app context at runtime

In the main app code, Wictor wrote a quick method to check if the user context was in Microsoft Teams:

private isInTeams(): boolean {
    return (<any>this.context.pageContext).teams !== undefined;
  }

He then used this throughout the app code, performing some different actions at runtime if a Teams context was detected:

if (this.isInTeams()) {
                    // if we're in Teams we already know the channel
                    channel = (<any>this.context.pageContext).teams.channelId;
                  } else {
                    // If we're not in Teams then use the channel submitted in the action
                    channel = (<any>submitAction.data).channel;
                  }

 

Takeaways

This is the first step in a very important journey for developers on the Office 365 ecosystem, including SharePoint and Teams but eventually extending to the rest of Office.

 

With cross-pollination between SharePoint and Teams developer toolchains, developers can create great user experiences built on the Microsoft Graph and deploy them as SharePoint SPFx web parts and Microsoft Teams apps (tabs) from a single codebase.  And these applications are context-aware, providing developers even more opportunities to delight end users by incorporating unique app context into the user experience.

 

Resources & next steps