OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
670 stars 96 forks source link

The identity API is not supported for this add-in in online Word #4759

Closed ishanig11 closed 5 days ago

ishanig11 commented 1 month ago

I have developed simple office addin using office manifest file. please refer attached manifest file manifest.zip

I have added below code as part of Add-in try{ const accessToken = await Office.auth.getAccessToken({ allowSignInPrompt: true, allowConsentPrompt: true, forMSGraphAccess: true, }); } catch (error) { console.log("Error obtaining token", error); }

but got error as "Error 13000, API for identity not supported " .

shanshanzheng-dev commented 1 month ago

Hi @ishanig11 Yes. Currently we don't support Office.auth.getAccessToken() for identify. We recommend you to upvote or submit a new Tech Community New Ideas item, this will give us visibility of the commonality of it and will help with our prioritization. If we end up working on this issue, we will re-activate as needed.    Microsoft 365 Developer Platform - Microsoft Community Hub Thanks for reporting this.

ishanig11 commented 1 month ago

How can I get user identity then? Basically using that I want to perform file rename operation.

On Wed, 7 Aug 2024, 07:19 shanshanzheng-dev, @.***> wrote:

Hi @ishanig11 https://github.com/ishanig11 Yes. Currently we don't support Office.auth.getAccessToken() for identify. We recommend you to upvote or submit a new Tech Community New Ideas item, this will give us visibility of the commonality of it and will help with our prioritization. If we end up working on this issue, we will re-activate as needed.    Microsoft 365 Developer Platform - Microsoft Community Hub https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform Thanks for reporting this.

— Reply to this email directly, view it on GitHub https://github.com/OfficeDev/office-js/issues/4759#issuecomment-2272464493, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFS5767C7PC4UP3XTZYHXYLZQF4JTAVCNFSM6AAAAABMCJPDNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGQ3DINBZGM . You are receiving this because you were mentioned.Message ID: @.***>

stevefengjin commented 2 weeks ago

@jipyua could you please look into this and provide assistance?

ishanig11 commented 1 week ago

Any update on this?

shanshanzheng-dev commented 1 week ago

Hi @slabereemsft could you please help to take a look? Thanks.

jargil commented 5 days ago

@ishanig11 - have you seen our documentation for handling SSO errors? https://learn.microsoft.com/en-us/office/dev/add-ins/develop/troubleshoot-sso-in-office-add-ins#13000 I recommend following our guidance here too: https://learn.microsoft.com/en-us/office/dev/add-ins/develop/sso-in-office-add-ins?tabs=jsonmanifest

Your manifest does not have the WebApplicationInfo section.