Yammer Embed in Teams Tab

%3CLINGO-SUB%20id%3D%22lingo-sub-2084060%22%20slang%3D%22en-US%22%3EYammer%20Embed%20in%20Teams%20Tab%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2084060%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20we%20run%20into%20an%20issue%20embedding%20a%20Yammer%20feed%20into%20a%20MS%20Teams%20Tab%20in%20the%20desktop%20client.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20are%20embedding%20a%20page%20which%20contains%20the%20following%20code%20snippet%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-html%22%3E%3CCODE%3E%3CSCRIPT%20type%3D%22text%2Fjavascript%22%20src%3D%22https%3A%2F%2Fcanary-azure.assets-yammer.com%2Fassets%2Fplatform_embed.js%22%3E%3C%2FSCRIPT%3E%0A%3CDIV%20id%3D%22embedded-feed%22%20style%3D%22width%3A100%25%3Bheight%3A100%25%22%3E%3C%2FDIV%3E%20%20%20%20%0A%3CSCRIPT%20type%3D%22text%2Fjavascript%22%3E%0A%20%20%20%20%20%20%20%20yam.connect.embedFeed(%7Bcontainer%3A%20'%23embedded-feed'%0A%20%20%20%20%20%20%20%20%2C%20network%3A%20'ichicraft.com'%0A%20%20%20%20%20%20%20%20%2C%20feedType%3A%20'group'%0A%20%20%20%20%20%20%20%20%2C%20feedId%3A%20'0'%0A%20%20%20%20%20%20%20%20%2C%20config%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20header%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%2C%20footer%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%2C%20showOpenGraphPreview%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%2C%20defaultToCanonical%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%2C%20hideNetworkName%3A%20false%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%3C%2FSCRIPT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20page%20loads%20correctly%20and%20the%20Yammer%20login%20button%20appears%20on%20the%20page.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20nothing%20happens%20when%20pressing%20the%20'Login'%20button%20which%20is%20shown.%20Investigation%20in%20MS%20Teams%20DevTools%20shows%20the%20following%20error%20in%20the%20console%20when%20clicking%20the%20'Login'%20button%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3Eyam-platform-feed-6d%E2%80%A6be449561aa9a7c.js%3A2%20Uncaught%20Error%3A%20Unable%20to%20deserialize%20cloned%20data%20due%20to%20invalid%20or%20unsupported%20version.%0A%20%20%20%20at%20EventEmitter..%2Flib%2Frenderer%2Fipc-renderer-internal.ts.exports.ipcRendererInternal.sendSync%20(ipc-renderer-internal.ts%3A15)%0A%20%20%20%20at%20Object.invokeSync%20(ipc-renderer-internal-utils.ts%3A19)%0A%20%20%20%20at%20Object.%3CANONYMOUS%3E%20(init.js%3A48)%0A%20%20%20%20at%20Object..%2Flib%2Fsandboxed_renderer%2Finit.js%20(init.js%3A223)%0A%20%20%20%20at%20__webpack_require__%20(bootstrap%3A19)%0A%20%20%20%20at%20bootstrap%3A83%0A%20%20%20%20at%20___electron_webpack_init__%20(bootstrap%3A83)%0A%20%20%20%20at%20module.js%3A22%0A%20%20%20%20at%20yam-platform-feed-6d%E2%80%A6be449561aa9a7c.js%3A2%0A%20%20%20%20at%20Object.c.login%20(yam-platform-feed-6d%E2%80%A6be449561aa9a7c.js%3A2)%3C%2FANONYMOUS%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20checking%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fs0-azure.assets-yammer.com%2Fassets%2Freleases%2Fstable%2Fyam-platform-feed-6d9e83be449561aa9a7c.js%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fs0-azure.assets-yammer.com%2Fassets%2Freleases%2Fstable%2Fyam-platform-feed-6d9e83be449561aa9a7c.js%3C%2FA%3E%26nbsp%3BJavaScript%20file%20which%20is%20loaded%2C%20it%20appears%20the%20login%20method%20is%20executed%2C%20and%20attempting%20a%20window.open%2C%20which%20Teams%20Desktop%20Client%20blocks%20for%20security%20reasons.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20tried%20the%20config.use_sso%20%3D%20true%20parameter%2C%20but%20this%20doesn't%20make%20any%20difference.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20another%20way%20to%20make%20the%20embed%20functionality%20work%20in%20MS%20Teams%20Desktop%20Client%3F%20I'm%20able%20to%20obtain%20an%20access%20token%20for%20Yammer%20programmatically%2C%20but%20don't%20want%20to%20use%20the%20SDK%20since%20we%20then%20have%20to%20implement%20UI%20ourselves.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20someone%20could%20help%20us%20out!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2084060%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAuthentication%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EEmbed%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELogin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYammer%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hi, we run into an issue embedding a Yammer feed into a MS Teams Tab in the desktop client. 

 

We are embedding a page which contains the following code snippet:

<script type="text/javascript" src="https://canary-azure.assets-yammer.com/assets/platform_embed.js"></script>
<div id="embedded-feed" style="width:100%;height:100%"></div>    
<script type="text/javascript">
        yam.connect.embedFeed({container: '#embedded-feed'
        , network: 'ichicraft.com'
        , feedType: 'group'
        , feedId: '0'
        , config: {
             header: false
             , footer: false
             , showOpenGraphPreview: false
             , defaultToCanonical: false
             , hideNetworkName: false
        }
    });
</script>

The page loads correctly and the Yammer login button appears on the page.

 

However, nothing happens when pressing the 'Login' button which is shown. Investigation in MS Teams DevTools shows the following error in the console when clicking the 'Login' button:

yam-platform-feed-6d…be449561aa9a7c.js:2 Uncaught Error: Unable to deserialize cloned data due to invalid or unsupported version.
    at EventEmitter../lib/renderer/ipc-renderer-internal.ts.exports.ipcRendererInternal.sendSync (ipc-renderer-internal.ts:15)
    at Object.invokeSync (ipc-renderer-internal-utils.ts:19)
    at Object.<anonymous> (init.js:48)
    at Object../lib/sandboxed_renderer/init.js (init.js:223)
    at __webpack_require__ (bootstrap:19)
    at bootstrap:83
    at ___electron_webpack_init__ (bootstrap:83)
    at module.js:22
    at yam-platform-feed-6d…be449561aa9a7c.js:2
    at Object.c.login (yam-platform-feed-6d…be449561aa9a7c.js:2)

 

When checking the https://s0-azure.assets-yammer.com/assets/releases/stable/yam-platform-feed-6d9e83be449561aa9a7c.js JavaScript file which is loaded, it appears the login method is executed, and attempting a window.open, which Teams Desktop Client blocks for security reasons.

 

Also tried the config.use_sso = true parameter, but this doesn't make any difference.

 

Is there another way to make the embed functionality work in MS Teams Desktop Client? I'm able to obtain an access token for Yammer programmatically, but don't want to use the SDK since we then have to implement UI ourselves.

 

Hope someone could help us out!

0 Replies