Outlook add-in failed to sideload due to authorization 401 from visual code

Benjamin Agic 30 Reputation points
2024-02-15T19:23:01.08+00:00

I am trying to develop a simple add on for Outlook by following the tutorial on how to make task pane. Pretty basic..the issue is once I do npm run I get this error:

STDERR: (×) Error: [Login] Failed to retrieve token silently.

This appears after I windows prompts me to sign in with my microsoft credentials. I have trial license and my outlooks and microsoft 365 works perfectly.

I followed the tutorial down to last detail and I was using yeomangenerator with visual code as editor, link to tutorial: https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/outlook-quickstart?tabs=yeomangenerator  Below this code block you can find the full traceback of error, please if anyone can help me out I would appreciate it a lot, am getting a bit desparate.

My output and traceback:

Warning: We are planning to depreate 'teamsfx' as command signagure and move to 'teamsapp' instead in the next major version of Teams Toolkit CLI. This command is in preview. Log in to your Microsoft 365 account - opening default web browser at https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=7ea7c24c-b1f6-4a20-9d11-9ae12e9e7ac0&scope=https%3A%2F%2Ftitles.prod.mos.microsoft.com%2F.default%20openid%20profile%20offline_access&redirect_uri=http%3A%2F%2Flocalhost%3A55972&client-request-id=8f3d8da9-b741-47b6-bba5-1f077d0bc8c4&response_mode=query&response_type=code&x-client-SKU=msal.js.node&x-client-VER=1.17.3&x-client-OS=win32&x-client-CPU=x64&client_info=1&code_challenge=1w2r0iCgpHzKCmiweGsTKMfSnu9kCT7yW9VVldjVkFQ&code_challenge_method=S256&prompt=select_account# 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\USR\.fx\account and try again. invalid_scope: 70011 - [2024-02-14 17:23:09Z]: 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: a43b9845-8df2-4dcb-9555-a298b67b7a01 Correlation ID: ab1c2e87-3d10-46e2-aa0b-784cc65cc8da Timestamp: 2024-02-14 17:23:09Z - Correlation ID: ab1c2e87-3d10-46e2-aa0b-784cc65cc8da - Trace ID: a43b9845-8df2-4dcb-9555-a298b67b7a01 (×) 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\USR\Desktop\Plugin\SheildIT\node_modules\@microsoft\teamsfx-cli\lib\index.js:14:300960)\n at settle (C:\Users\USR\Desktop\Plugin\SheildIT\node_modules\@microsoft\teamsfx-cli\lib\index.js:14:305240)\n at IncomingMessage.handleStreamEnd (C:\Users\USR\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":{}}

Outlook
Outlook
A family of Microsoft email and calendar products.
4,360 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,178 questions
{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.