问题
Update: I just realized that I can install it if I download it and then bring it in via Apps > Upload a custom app, so it's only installing it from within App Studio that gives the error.
I'm trying to work through the sample app at https://docs.microsoft.com/en-us/microsoftteams/platform/get-started/get-started-dotnet-app-studio, but I'm stuck at the part where you install it into Teams.
I get the error: "Uploading custom apps is not allowed."
According to Prepare your Office 365 tenant, in the admin center, under Settings > Services & add-ins > Microsoft Teams > Tenant-wide settings > Apps, I should turn on "Allow sideloading of external apps." In my tenant, that is indeed turned off:
But I can't turn it on. It's disabled, saying the settings have moved to the "Microsoft Teams & Skype for Business admin center."
In that admin center, I went to Teams apps > Permission policies. There, for "Global (Org-wide default), I have "allow all apps" for everything: .
For "Org-wide app settings", I have interaction with custom apps turned on: .
Under Setup policies > Global (Org-wide default), I have "Allow uploading custom apps" on: .
And I'm signed in as a user governed by that policy:
I'm stumped. What else do I need to do so that I can sideload a Teams app for development?
回答1:
I had the same problem and it actually made me crazy especially because it may take a few hours to apply changes. Finally I was able to resolve the problem in the following way. I can imagine that certain steps are unnecessary but who knows.
- By following instructions in the Manage app setup policies in Microsoft Teams, enable "Upload custom apps" in "Global (Org-wide default)".
- Following same instructions created a custom setup policy with enabled "Upload custom apps".
- Enable all permissions in "Global (Org-wide default)" as described in the Manage app permission policies in Microsoft Teams
- Create a new permission policy with everything enabled.
- Wait about an hour.
- Assign these new policies to the user.
- Make sure that everything what is mentioned in Manage custom app policies and settings in Microsoft Teams is enabled.
- Wait another hour.
- Quit desktop application, and start it again.
Now, finally, it works.
来源:https://stackoverflow.com/questions/57867035/uploading-custom-apps-is-not-allowed-when-installing-microsoft-teams-sample-ap