Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sideloading fails with invalid scope #820

Closed
1TheMuffinMan opened this issue Apr 9, 2024 · 19 comments
Closed

Sideloading fails with invalid scope #820

1TheMuffinMan opened this issue Apr 9, 2024 · 19 comments

Comments

@1TheMuffinMan
Copy link

1TheMuffinMan commented Apr 9, 2024

Prerequisites

Please answer the following questions before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.

  • [x ] I am running the latest version of Node and the tools
  • [x ] I checked the documentation and found no answer
  • [ x] I checked to make sure that this issue has not already been filed

yo command: yo office --projectType react --name "OutlookReact3" --host outlook --ts true

NPM: * 20.12.1 (Currently using 64-bit executable)

I'm on Windows 11 using Vscode. I followed the instructions in this repository to create a react app for outlook. When I run npm start a browser window opens that asks me to sign in. Once complete, I get the following error in the VScode terminal:

  Error: Unable to start debugging.
  Error: Unable to sideload the Office Add-in.
  Error: Command failed: npx @microsoft/teamsapp-cli install --xml-path "C:\Users\nlech\Development\Company\OutlookReact3\manifest.xml"
  npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
  (×) Error: [Login] Failed to retrieve token silently. If you encounter this problem multiple times, you can delete `C:\Users\nlech\.fx\account` and try again. invalid_scope: 70011 - [2024-04-09 22:11:46Z]: 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: fb4068bb-8ff8-4c14-b9b7-f116086fa802 Correlation ID: 43132cd8-a5ce-44d1-a60e-d68848eb9a98 Timestamp: 2024-04-09 22:11:46Z - Correlation ID: 43132cd8-a5ce-44d1-a60e-d68848eb9a98 - Trace ID: fb4068bb-8ff8-4c14-b9b7-f116086fa802
  (×) Error: Sideloading failed.
  (×) Error: {"statusCode":401,"message":"Unauthorized"}
  (×) Error: m365.InternalError: {"message":"Request failed with status code 401","detail":"{\"statusCode\":401,\"message\":\"Unauthorized\"}","tracingId":""}

Yes, I've already tried deleting C:\Users\nlech\.fx\account.

I didn't touch the project after creating it, I just ran npm install/npm start. I have an old Javascript add-in that I built in visual studio and it doesn't have any problem sideloading to the same account I tried to authenticate with.

2024-04-09_19-12-40.mp4
@AlexJerabek
Copy link
Contributor

Thanks for reporting this @1TheMuffinMan. @millerds, could you please investigate?

@1TheMuffinMan
Copy link
Author

1TheMuffinMan commented Apr 10, 2024

You're welcome. I spent some time trying to troubleshoot it myself by using different accounts.

I'm wondering if the underlying issue is that the Office account subscription needs to be one that supports sideloading AND sideloading needs to be turned on in some admin portal? If that ends up being the case I think there is an opportunity to update the sideloading documentation.

I tried on a basic subscription and then on a Microsoft 365 family subscription. I haven't tried with a business subscription.

@1TheMuffinMan
Copy link
Author

1TheMuffinMan commented Apr 11, 2024

@AlexJerabek @millerds Ok gents I have solved the mystery. This requires a Microsoft 365 business subscription. One thing I notice between personal/business is that personal goes to outlook.live.com and business goes to outlook.office.com.

Funny enough, there seems to be a bug in the Microsoft 365 website where it tries to redirect personal account to outlook.office.com which results in a license not assigned error screen.

Anyways, I think we could update the documentation to make this clear.

image

image

@McL-M
Copy link

McL-M commented Apr 23, 2024

Just today, I went to create a new build of the add-in I'm working on. In doing so, I wanted to start with the most up-to-date template. I'm now getting this problem.

Question is, is this working as intended or is it a bug?

I don't have a business account, as this is a side project I'm working on solo.

@1TheMuffinMan
Copy link
Author

I'm a bit surprised that I never got a response from the office team beyond the initial one.

@hn3000
Copy link

hn3000 commented Apr 23, 2024

I had the same problem following the tutorial.

@McL-M
Copy link

McL-M commented Apr 23, 2024

I'm a bit surprised that I never got a response from the office team beyond the initial one.

It would be nice to know if we should expect a fix for this.

@millerds
Copy link
Contributor

This is by design for Outlook. You can get a dev test to try things out on at https://developer.microsoft.com/en-us/microsoft-365/dev-program.

@1TheMuffinMan
Copy link
Author

This is by design for Outlook. You can get a dev test to try things out on at https://developer.microsoft.com/en-us/microsoft-365/dev-program.

Is possible to update the documentation with this note about Outlook? Or even better, the app tells you why it failed in the output.

@McL-M
Copy link

McL-M commented Apr 24, 2024

This is by design for Outlook. You can get a dev test to try things out on at https://developer.microsoft.com/en-us/microsoft-365/dev-program.

I'm a little taken aback that this is by design.

First, I'd love to understand the logic behind this change. Older versions still work, so why change the way it works for the newest version?

Also, is this only for Outlook add-ins?

Finally, I just went to the link and signed up (even though I thought I had done so before), but the in the dashboard it says "Thank you for joining. You don't current qualify for a Microsoft 365 Developer Program sandbox subscription."

However, I skimmed the FAQ and the terms of use and cannot clearly find what the requirements for qualifying are. The FAQ suggests a personal license can be used, but it didn't for me. Does this actually require a business license?

As a private person working on a project which I want to someday turn into something viable, I sincerely hope this isn't the end of my project.

@1TheMuffinMan
Copy link
Author

Same experience, I actually signed up multiple times with different answers and it told me I didn't quality for the dev subscription.

Furthermore, Office is a flagship product for Microsoft, a company with immense resources and somehow we can barely get a response from anyone about this problem. Still not a response @AlexJerabek that I tagged 2 weeks ago.

@millerds
Copy link
Contributor

I can't speak to the dev program signup problems . . .

However, I do know the there is an effort underway to unify the online store of add-ins / extensions / apps that different applications use, including Teams and Office. As a result of this change newer versions of Outlook get their add-ins from this new service instead of exchange (you may have noticed the changes to the add-in buttons in the ribbon) and currently that new service requires the use of a business account even for sideloading. The dev program is supposed to be the way this can currently still work.

Other office applications are not affected by this change yet (Outlook is the first) and still sideload add-in locally without the need for any account. I can't say when or if that will change in the future.

@McL-M
Copy link

McL-M commented Apr 24, 2024

Same experience, I actually signed up multiple times with different answers and it told me I didn't quality for the dev subscription.

Yeah, it's a problem.

Furthermore, Office is a flagship product for Microsoft, a company with immense resources and somehow we can barely get a response from anyone about this problem. Still not a response @AlexJerabek that I tagged 2 weeks ago.

I get the sense that add-in development is pretty niche and, as such, minimal resources are being put in to supporting it. But I could be wrong, on that, just a feeling.

@McL-M
Copy link

McL-M commented Apr 25, 2024

I can't speak to the dev program signup problems . . .

However, I do know the there is an effort underway to unify the online store of add-ins / extensions / apps that different applications use, including Teams and Office. As a result of this change newer versions of Outlook get their add-ins from this new service instead of exchange (you may have noticed the changes to the add-in buttons in the ribbon) and currently that new service requires the use of a business account even for sideloading. The dev program is supposed to be the way this can currently still work.

Other office applications are not affected by this change yet (Outlook is the first) and still sideload add-in locally without the need for any account. I can't say when or if that will change in the future.

Thank you for the info, @millerds, it's appreciated.

I do want to give some feedback about this change that you might pass upward, if you are so inclined.

In short, not good. Trying to unify things makes sense and is fine, in and of itself.

But requiring a business account for sideloading a locally developed project is essentially asking us to make and pay for an account just to enable us to check that we've made and paid for that account.

There's no value-added function and it's not actually necessary for running anything, as older versions prove.

I realize that the dev program is supposed to give us access, but the fact that it's not working does not inspire confidence.

And there's no middle ground for solopreneurs or hobbyists. It jumps from VS Community and VS Code being free and recommended to Business subscription being $45 a month.

@millerds
Copy link
Contributor

Preaching to the choir here :-). Having customer feedback to that effect helps me make my case to others making these decisions.

@McL-M
Copy link

McL-M commented Apr 25, 2024

Preaching to the choir here :-). Having customer feedback to that effect helps me make my case to others making these decisions.

I hope it helps!

@millerds
Copy link
Contributor

millerds commented Apr 29, 2024

Looks like you can sideload the manifest to your personal account manually using outook.com.

  1. Open outlook.com and login to your account
  2. Select an email so the reading pane is displayed
  3. Click the apps button in the reading pane and then click "get add-ins"
    GetAdd-ins
  4. Click "My add-ins"
  5. Scroll to the bottom and click "Add a custom add-in"

Making this better is something we are looking into. Thanks for the feedback!

@1TheMuffinMan
Copy link
Author

@millerds thanks. And FWIW appreciate the work you guys have put in so far. The yeoman generator in general is great.

@McL-M
Copy link

McL-M commented Apr 30, 2024

@millerds Thank you!

Just tested it and I can confirm you can also do this in desktop Outlook. Process is basically the same.

Main difference is that you click on the "Get Add-ins" button on the "Home" ribbon. Everything else is the same.

A good workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants