OfficeDev / microsoft-teams-library-js

JavaScript library for use by Microsoft Teams apps
https://docs.microsoft.com/microsoftteams/platform/
Other
427 stars 195 forks source link

Getting empty SSO token from mobile outlook app #2537

Open chandraarora opened 1 day ago

chandraarora commented 1 day ago

Hi

We have developed a teams app which takes the sso token from the app and get the onbehalf of token from entra (Azure AD). We are using the teams SDK teamsUserCredential.getToken(''). This is working on Teams apps (dekstop, mobile , web) , outlook web but on outlook on mobile we get empty SSO token. What could be wrong? Please see the code below.

I would appriciate any help, we do not find any reason whey it does not work on outlook of android and ios but it works on rest the platform.


async (teamsUserCredential, { dispatch, rejectWithValue, getState }) => {
    const { auth } = getState()
    try {
      **var tokenRes = await teamsUserCredential.getToken('')**
      const teamsContext = await app.getContext()
      const res = await getRecentOneDriveFiles(
        tokenRes.token,
        '',
        teamsContext.user.tenant.id
      )

Best regards Chandra

Nivedipa-MSFT commented 1 day ago

@chandraarora - Thanks for reporting your issue. We will check this and update you soon.