SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

Not able to add to Teams #9889

Open tboehm-yourBytes opened 2 months ago

tboehm-yourBytes commented 2 months ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

Hello everyone, i currently have a spfx app which worked for the last 1.5 Years now. I updated the app and now im unable to add the application to teams anymore, without any (informational) error. So i tried to create a new app and can reproduce this behaviour with it.

Steps to reproduce

I opened developer console and saw an request which fails everytime i try to add the app. It calls .sharepoint.com/_api/web/hostedapps/add which results in 500 Internal Server Error with this body.

{
    "error": {
        "code": "-2146232832, Microsoft.SharePoint.SPException",
        "message": "hostedAppConfigsList null"
    }
}

Any help would be appreciated!

Expected behavior

The app should be able to add as Teams Tab, as before, or if the error is right - it should display a meaningful message

frags51 commented 1 month ago

hi @tboehm-yourBytes , did you try adding TeamsTab to supported hosts in the manifest of your SPFx app? "supportedHosts": ["SharePointWebPart", "TeamsTab"],

Please check if this doc helps - https://learn.microsoft.com/en-us/sharepoint/dev/spfx/integrate-with-teams-introduction

raclettierer commented 1 month ago

I have the same behavior

code: "-2146232832, Microsoft.SharePoint.SPException" message: "hostedAppConfigsList null"

if I add a custom app to a new Team the request goes to the root an get this error https://xxx.sharepoint.com/_api/web/hostedapps/add

When I first open the Files Tab and add as second step the custom app the process work

beakalz commented 1 month ago

we have also faced the same problem when we try to add SPFX solution app as a tab in the new microsft teams, but it works fine with the classic teams, we get this error message { "error": { "code": "-2146232832, Microsoft.SharePoint.SPException", "message": "hostedAppConfigsList null" } }