Forum Discussion

danieljcutter's avatar
danieljcutter
Copper Contributor
Mar 31, 2025

@microsoft/teams-js Error: SDK initialization timed out

Hi all,

I've\ been developing a MSFT teams app. Originally I was using MSAL for auth but it seems as though the teams desktop app blocks the popups required for auth, so I've been trying to migrate over to microsoft/teams-js.

However, it seems as though I'm getting errors when trying to initialize the library.

`Error: SDK initialization timed out`

Here is how I'm attemtping to initialize.

```ts

const init = async (): Promise<void> => {

      console.log('Initializing MSFT client...')

      await microsoftTeams.app.initialize()

      setIsInitialized(true)

      console.log('MSFT client initialized')

      const authToken = await microsoftTeams.authentication.getAuthToken()

      console.log('MSFT auth token:', authToken)

    }

```

I have created this app using the Teams toolkit in vscode, and it is simply an iframe pointing to my web app that is hosted elsewhere.

Could this be the root cause of the issue? Can you have iframes as a tab app?

This is with version 2.35.0.

Resources