Overcome taskpane add-in (Word) SSO issue - error 13000

Ed Neary 20 Reputation points
2025-06-24T17:30:58.0866667+00:00

We are creating an add-in that needs to retrieve the user's M365 email - the add-in is a taskpane and made for Word and Excel. The issue occurs when getting the access token prior to calling the graph api.

Office.onReady(async () => {
  try {
	// fails here
    const accessToken = await OfficeRuntime.auth.getAccessToken({ allowSignInPrompt: true });

    const user = await getUserDetails(accessToken);
    document.getElementById("userInfo").innerText = 
      `Name: ${user.displayName}\nEmail: ${user.mail || user.userPrincipalName}`;
  	} 
  catch (error) {   
	console.error("Error:", error);
  }
});

The error is:

{name: 'API Not Supported', message: 'The identity API is not supported for this add-in.', code: 13000}

The add-in manifest is:

simple.xml

The html and javascript for the add-in is hosted locally:

https://localhost/simple.html

Here are the details for the Azure application:

User's imageUser's imageUser's image

Microsoft 365 and Office | Development | Office JavaScript API
0 comments No comments
{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.