Replies: 6 comments
-
Hi @leybal |
Beta Was this translation helpful? Give feedback.
-
Just submitted a PR to fix this. @leybal If the client id or tenant is incorrect for the registration you created, then pretty much all subsequent steps fail. You won't be able to get an access token, and then later you will see the error that the token is missing. so hopefully this fixes the issue. Also with this update you should be able to run the automated registration script which will plug in the client id and tenant id for you. |
Beta Was this translation helpful? Give feedback.
-
@davidchesnut thank you, I successfully launched the project. When logging in with a student account, I got an SPO license error. This can be fixed if we switching to a business account. Looks like graph API supports only for Office 365 Business accounts. It's also goop to mention in Read.me or official documentation. |
Beta Was this translation helpful? Give feedback.
-
The sample creates a single tenant registration so that only accounts from the tenant are supported. You can also create an app registration (manual steps in the readme) but select the option for "Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)" in the Azure portal. That will provide multi-tenant support. However you will also need to update the authority in authconfig.js to Hope this helps, |
Beta Was this translation helpful? Give feedback.
-
i want to display the excel sheet in my react application and capture the all events and store the values in the sharepoint |
Beta Was this translation helpful? Give feedback.
-
i want to display the excel sheet in my react application and capture the all events and store the values in the sharepoint list |
Beta Was this translation helpful? Give feedback.
-
Hi @davidchesnut and Microsoft team
We are trying to run the excel-create-worksheet-from-web-site example. As I understand it, you have provided your own clientId and tenantId values in the WebApplication/App/authConfig.js file. Code should be like this:
Please check authConfig.js file.
After replacing these values, we finally managed to log in with a Microsoft account. Now I can see sales data table.
After clicking on the Open in Microsoft Excel button, it redirects me to http://localhost:3000/undefined and there is an error
Error: ENOENT: no such file or directory, stat 'C:\projects\Office-Add-in-samples\Samples\excel-create- worksheet-from-web-site\WebApplication\index.html'.
Meanwhile on the index page, messages appear in the console
Also the link https://graph.microsoft.com/v1.0/me/drive/root:/openinexcel/spreadsheet.xlsx:/content gives me error
{"error":{"code":"InvalidAuthenticationToken","message":"Access token is empty.","innerError":{"date":"2023-02-24T16:31:38","request-id":"8b369ebd-5f07-497c-97bf-bc839d117fb1","client-request-id":"8b369ebd-5f07-497c-97bf-bc839d117fb1"}}}
Can you suggest what is the problem and how we can solve it?
Best regards
Beta Was this translation helpful? Give feedback.
All reactions