I have followed the instructions from here and registered an app via azure to test this Sample:
- link1: https://github.com/OfficeDev/PnP-OfficeAddins/tree/master/Samples/auth/Office-Add-in-Microsoft-Graph-React
- link2: https://docs.microsoft.com/en-us/graph/auth-register-app-v2
- Register an application with the Microsoft Identity Platform
- visit https://portal.azure.com/
- login with excel 365 acc
- [click ] on top left hand hamburger
- [select] - Azure Active Directory
- [scroll] to bottom of page to see icon - App registration
- [click] App registration
- [type name] Sample-Office-Add-in-Microsoft-Graph-React
- [select] - Accounts in any organizational directory
- [keep] - Web
- [type - redirect uri] https://localhost:3000/login/login.html
- [click] - register
- Copy client id to put into login/login.ts
- [copy] Client ID
- [paste] login/login.ts clientId
- cd to certs folder
cd Office-Add-in-Microsoft-Graph-React\certs
- [Dbl click] - ca.crt
- [click] Install certificate
- [Select] Local Machine
- [Select] Place all certificates in the following store
- [click] browse
- [Select] Trusted Root Certification Authorities
- [click] ok
- [click] next
- [click] Finish
The import was successful
You now have a self-signed certificate installed on your machine.
- run cmd as administrator: run node application
yarn start
- Note: Did not opwn separate cmd window. Stayed in same.
- Open new cmd terminal - run sideload
yarn run sideload
- in excel [click] - Open Add-in
- [click - button] Connect to Office 365
errorMessage: login_progress_error message: Login_In_Progress: Error during login call - login is already in progress. errorCode: ClientAuthError: Login_In_Progress: Error during login call - login is already in progress. at AuthError (eval code:26:9) at ClientAuthError (eval code:106:9) at ClientAuthError.createLoginInProgressError (eval code:143:9) at UserAgentApplication.prototype.acquireTokenInteractive (eval code:333:13) at UserAgentApplication.prototype.loginRedirect (eval code:246:9) at Office.initialize (eval code:50:13) at Anonymous function (https://appsforoffice.microsoft.com/lib/1.1/hosted/office.debug.js:1782:41) at validateFunction (https://appsforoffice.microsoft.com/lib/1.1/hosted/office.debug.js:306:21) at LoadScriptHelper.prototype.waitForFunction (https://appsforoffice.microsoft.com/lib/1.1/hosted/office.debug.js:318:13) at appReady (https://appsforoffice.microsoft.com/lib/1.1/hosted/office.debug.js:1778:25) .
I have looked in the other stackoverflow questions and github, and there is not a solution to this problem. Any advice.
I will post this in github also.
Access tokensandID tokens. I didn't see this in your instructions, did you do that? It's under the Authentication tab on the Left Nav in the App on portal.azure.com. Another note, on my production app I had to change<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.debug.js"></script>to<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>- nikolifish