Error in Microsoft Teams App on Outlook Mobile: Instantiating TeamsUserCredential Throws IA.InternalError

Mohammed Akanji 5 Reputation points
2024-02-28T17:31:52.4433333+00:00

Our Microsoft Teams app works properly on all other hosts but throws an error on Outlook mobile, as shown below. MicrosoftTeams-image (1) Error --> {"name": IA.InternalError, "code": IT.InternalError} The error occurs when instantiating the TeamsUserCrendential class and attempting to get the logged-in user's basic information (only on Outlook mobile).

Sample code (ReactJs)

// TeamsFx SDK version 2.3.0
const { loading, 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        
}});

Kindly assist in resolving the issue.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,915 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,187 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.