3

As title indicates, my add on is failing to sideload. I am trying to follow the official tutorial of microsoft on how to build your first outlook, developing a taskpane: https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/outlook-quickstart?tabs=yeomangenerator

I followed this tutorial down to the last letter but I am getting the same error. Basically after I set up my project, and I chose the language and name for my add on, I run the npm start from my vs code terminal, then I am being prompted to microsoft login portal, I sign up and then back to my vs code terminal I get 401..

I have my microsoft exchange account connected to outlook and it works, so I know thats not the issue..if anyone could help me I would appreciate it!

Here is the error:

Successfully registered package! (??) STDERR: (×) Error: [Login] Failed to retrieve token silently. If you encounter this problem multiple times, you can delete C:\Users\Benjamin Agic\.fx\account and try again. invalid_scope: 70011 - [2024-02-19 08:17:50Z]: AADSTS70011: The provided value for the input parameter 'scope' is not valid. The scope 'https://dev.teams.microsoft.com/AppDefinitions.ReadWrite openid profile offline_access' does not exist. Trace ID: fbf8f4fb-e2bb-4a2c-83d8-07c3ec040800 Correlation ID: d3d06969-78ae-4ba1-be44-85e4c4b3239c Timestamp: 2024-02-19 08:17:50Z - Correlation ID: d3d06969-78ae-4ba1-be44-85e4c4b3239c - Trace ID: fbf8f4fb-e2bb-4a2c-83d8-07c3ec040800 (×) Error: Sideloading failed. (×) Error: {"statusCode":401,"message":"Unauthorized"} (×) Error: m365.UnhandledError: An unexpected error has occurred while performing the M365 task. {"stack":"Error: {"message":"Request failed with status code 401","detail":"{\"statusCode\":401,\"message\":\"Unauthorized\"}","tracingId":""}\n at createError (C:\Users\Benjamin Agic\Desktop\Plugin\SheildIT\node_modules\@microsoft\teamsfx-cli\lib\index.js:14:300960)\n at settle (C:\Users\Benjamin Agic\Desktop\Plugin\SheildIT\node_modules\@microsoft\teamsfx-cli\lib\index.js:14:305240)\n at IncomingMessage.handleStreamEnd (C:\Users\Benjamin Agic\Desktop\Plugin\SheildIT\node_modules\@microsoft\teamsfx-cli\lib\index.js:14:290544)\n at IncomingMessage.emit (node:events:530:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","message":"{"message":"Request failed with status code 401","detail":"{\"statusCode\":401,\"message\":\"Unauthorized\"}","tracingId":""}","config":{}}

3
  • Do you get any errors when you sideload add-ins manually? Commented Feb 19, 2024 at 20:44
  • For some reason I can't sideload manually, I tried following the tutorial on that but I just dont see that window which they have in picture of tutorial, here is tutorial: learn.microsoft.com/en-us/office/dev/add-ins/outlook/… Instead when I click get add ins I get redirected to microsoft store where I can browse and add addins.. Commented Feb 20, 2024 at 7:40
  • Related stackoverflow.com/questions/78008528/… Commented May 21, 2024 at 3:30

3 Answers 3

0

The error message states that you are not authorized in Office 365 to sideload the add-in:

Error: Sideloading failed. (×) Error: {"statusCode":401,"message":"Unauthorized"} (×) Error: m365.UnhandledError: An unexpected error has occurred while performing the M365 task.

You may try to sideload the add-in manually, see Manually sideload an add-in to Office on the web for more information.

Sign up to request clarification or add additional context in comments.

2 Comments

So the thing I am confused at is the fact that I am authorized..like when I get prompted to sign in after I do npm start the window says you are now authenticated and may close this window, but then back in my terminal I get that error..and for the life of me I cant figure out why, could there be perhaps a some kind of restriction on outlook account or something? I also noticed that in my cache from .fx folder the json file which contains token i empty, could it be thats what causing this? Also link that you provided is not for outlook :/
@beni14 the issue is that the output doesn't tell you the real problem. You have to use a business account for this to work. They say you can get a free one, but when signing up it tells you that you're no eligible, so at the end of the day you need to buy a business account to develop with.
0

I've opened an issue about this in their github, but the solution is to use a Microsoft 365 Business account. If you can log into outlook.office.com then you have the correct type of subscription.

1 Comment

Could you enhance the answer by adding the link to your GitHub issue?
0

Prerequisites

You need to have an active Microsoft 365 Business Standard or Microsoft 365 Business Premium subscription. Note, you can get 1 month for free.

While acquiring the subscription, you will be prompted to create an onmicrosoft.com account.

Therefore, after successfully acquiring the subscription for [email protected] you will have two accounts (note, alice, bob, mycompany are just example placeholder names):

Correct login procedure

In Outlook, you need to be logged in with

In the pop-up window, you need to log in with

Incorrect login procedure

If you instead try to use [email protected] in the pop-up window, you'll get the Unauthorized 401 error

invalid_scope: 70011 - [2024-05-21 03:15:44Z]: AADSTS70011: The provided value for the input parameter 'scope' is not valid. The scope 'https://dev.teams.microsoft.com/AppDefinitions.ReadWrite openid profile offline_access' does not exist. Trace ID: [...] Correlation ID: [...] Timestamp: 2024-05-21 03:15:44Z - Correlation ID: [...] - Trace ID: [...]
(node:79101) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(✖) Error: Sideloading failed.
(✖) Error: {"statusCode":401,"message":"Unauthorized"}
(✖) Error: m365.InternalError: {"message":"Request failed with status code 401","detail":"{\"statusCode\":401,\"message\":\"Unauthorized\"}","tracingId":""}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.