Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Microsoft Teams App on Outlook Mobile: Instantiating TeamsUserCredential Throws InternalError #10987

Open
akanjimm opened this issue Mar 4, 2024 · 6 comments
Assignees
Labels

Comments

@akanjimm
Copy link

akanjimm commented Mar 4, 2024

Describe the bug
Our Microsoft Teams app works properly on all other hosts but throws an error on Outlook mobile.

The error occurs when instantiating the TeamsUserCrendential class and attempting to get the logged-in user's basic information (only on Outlook mobile).

To Reproduce
Steps to reproduce the behavior:

  1. Scaffold a new sso enabled tab app (Teams, Outlook, Microsoft 365)
  2. Instantiate the TeamsUserCredential class and call the getUserInfo() or getToken("") method
// Example code using TeamsFx SDK version 2.3.0
const { loading, data, reload } = useData(async () => {        
	try {            
		const authConfig = {                
			clientId: process.env.REACT_APP_CLIENT_ID,                
			initiateLoginEndpoint: process.env.REACT_APP_START_LOGIN_PAGE_URL,            
		};            
		const credential = new TeamsUserCredential(authConfig);            
		const userData = await credential.getUserInfo();        
	} catch (err) {            
		// error handling        
}});
  1. Check out the app on Outlook mobile

Expected behavior
For the app to be accessible across all hosts (desktop, web and mobile) and to get a logged-in user's basic data, without throwing error on outlook mobile

Screenshots
Check out screenshot for error message on Outlook mobile and inability to get data from the Azure Functions backend
MicrosoftTeams-image (2)

Test app on Microsoft 365 mobile
MicrosoftTeams-image (3)

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Mar 4, 2024
@adashen adashen added investigating TA:Auth Team Area: Auth labels Mar 6, 2024
@KennethBWSong
Copy link
Contributor

@akanjimm Thank you for reporting this issue. Would you please tell us which OS are you using (Android/iOS) and the version of Outlook app?

@akanjimm
Copy link
Author

akanjimm commented Mar 8, 2024

@KennethBWSong I'm using iOS and the version of the Outlook app is 4.2408.1

@KennethBWSong
Copy link
Contributor

@akanjimm Thank you for your info. We are investigating this issue and will reach out to you as soon as we have any updates.

@adashen adashen removed the needs attention This issue needs the attention of a contributor. label Mar 25, 2024
@petr-istratov
Copy link

Any updates in this? We're having same issue

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Apr 1, 2024
@KennethBWSong
Copy link
Contributor

Hi @petr-istratov We have upstream dependency on Outlook team for this issue and will update here if any progress.

@adashen adashen removed the needs attention This issue needs the attention of a contributor. label Apr 8, 2024
@KennethBWSong
Copy link
Contributor

Hi @akanjimm @petr-istratov Sorry for late reply. After debug with Outlook team, would you please try to add following lines in ./aad.manifest.json and see whether this can fix your issue?

{
  ...
  "preAuthorizedApplications": [
    ...
    {
      "appId": "27922004-5251-4030-b22d-91ecd9a37ea4",
      "permissionIds": [
        "${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants