OfficeDev / microsoft-teams-library-js

JavaScript library for use by Microsoft Teams apps
https://docs.microsoft.com/microsoftteams/platform/
Other
417 stars 187 forks source link

Duplicate Tabs Generated Upon Uploading Custom Team App #2321

Closed asith-w closed 2 weeks ago

asith-w commented 3 weeks ago

When uploading the team manifest file as a custom app to Teams Channel, two tabs are being created instead of just one. Is there a specific reason for this issue occurring?

image

image

      microsoftTeams.settings.setSettings({
        entityId: "Main",
        contentUrl:
          window.location.origin +
          "/Tabs/MyTab?loginHint={loginHint}&userObjectId={userObjectId}&userPrincipalName={userPrincipalName}&tenantId={tid}&locale={locale}&theme={theme}&userPrincipalName={userPrincipalName}",
        suggestedDisplayName: "Calendar+",
      });
      saveEvent.notifySuccess();

    });

    "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.12/MicrosoftTeams.schema.json",
    "manifestVersion": "1.12",
    "version": "1.0.1",
    "id": "b2a05688-9f2b-43ce-a525-95adbefbad6c",
    "packageName": "MyApp",
    "developer": {
        "name": "mycompany",
        "websiteUrl": "https://www.mycompany.com",
        "privacyUrl": "https://www.mycompany.com/privacy-policy-services/",
        "termsOfUseUrl": "https://www.mycompany.com/terms-and-conditions-services/",
        "mpnId": ""
    },
    "icons": {
        "color": "color.png",
        "outline": "outline.png"
    },
    "name": {
        "short": "MyApp",
        "full": "MyApp Teams App by mycompany"
    },
    "description": {
        "short": "MyApp focuses on ..........",
        "full": "**MyApp Features**  \n Using MyApp, users can plan/create ..........." 
    },
    "accentColor": "#d03808",
    "configurableTabs": [
        {
            "configurationUrl": "https://12345.ngrok.io/TeamTabs/TabConfiguration?loginHint={loginHint}&userObjectId={userObjectId}&userPrincipalName={userPrincipalName}&tenantId={tid}&locale={locale}&theme={theme}&userPrincipalName={userPrincipalName}",
            "canUpdateConfiguration": false,
            "scopes": [
                "team"
            ]
        }
    ],
    "staticTabs": [
        {
            "entityId": "d12c7518-3b2a-4a1f-a39b-56c7edad4a3a",
            "name": "MainTab",
            "contentUrl": "https://12345.ngrok.io/StaticTabs/MainTab?loginHint={loginHint}&userObjectId={userObjectId}&userPrincipalName={userPrincipalName}&tenantId={tid}&locale={locale}&theme={theme}&userPrincipalName={userPrincipalName}",
            "scopes": [
                "personal"
            ]
        },
        {
            "entityId": "0ed581df-4e8d-4808-a35b-919e1116ee0c",
            "name": "Help",
            "contentUrl": "https://12345.ngrok.io/StaticTabs/HelpTab?loginHint={loginHint}&userObjectId={userObjectId}&userPrincipalName={userPrincipalName}&tenantId={tid}&locale={locale}&theme={theme}&userPrincipalName={userPrincipalName}",
            "scopes": [
                "personal"
            ]
        }
    ],
    "permissions": [
        "identity",
        "messageTeamMembers"
    ],
    "validDomains": [
        "12345.ngrok.io"
    ],
    "webApplicationInfo": {
        "id": "8a4e6267-86bc-4622-8192-19e6e9a6d99b",
        "resource": "api://12345.ngrok.io/8a4e6267-86bc-4622-8192-19e6e9a6d99b"
    },
    "subscriptionOffer": {
        "offerId": "mycompa..."
    },
    "authorization": {
        "permissions": {
            "resourceSpecific": [
                {
                    "name": "InAppPurchase.Allow.User",
                    "type": "Delegated"
                },
                {
                    "name": "InAppPurchase.Allow.Group",
                    "type": "Delegated"
                },
                {
                    "name": "InAppPurchase.Allow.Chat",
                    "type": "Delegated"
                }
            ]
        }
    }
}
Vaibhav-MSFT commented 2 weeks ago

Hello @asith-w , Thanks for reporting your issue. We will test this and update you soon.

asith-w commented 2 weeks ago

The issue was resolved by upgrading the Teams js version.

microsoft-github-policy-service[bot] commented 2 weeks ago

Tell us about your experience!

Hi asith-w! We have closed this issue in our system, but we would love to hear your feedback. To let us know how we did, simply use one of the following emoji icons: :thumbsup: for resolved, :thumbsdown: for unresolved, or :heart: for a great experience on this message. Please use the link for more detailed feedback.

Best regards, Teams Platform