Share via

Error: {"errorCode": 1000, "message": "App doesn't have sufficient permission to use this API"} while using "shareAppContentToStage" function for teams custom app

Mangesh Singh 0 Reputation points
2025-03-17T20:28:30.25+00:00

I’m developing a custom Teams app for the meeting side panel and trying to use "shareAppContentToStage," but it throws an error: {"errorCode": 1000, "message": "App doesn't have sufficient permission to use this API"}.

This is my function to share content to stage:

  const shareSpecificPart = () => {
	microsoftTeams.app.initialize().then(() => {
        const appContentUrl = "https://www.bing.com/";

        microsoftTeams.meeting.shareAppContentToStage((err, result) => {
            if (result) {
                // handle success
            }
            if (err) {
                // handle error
                console.error(err)
            }
        }, appContentUrl);
  });
  };

This is my mainifest.json file

{
    "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
    "manifestVersion": "1.19",
    "version": "1.0.0",
    "id": "${{TEAMS_APP_ID}}",
    "developer": {
        "name": "Teams App, Inc.",
        "websiteUrl": "${{TAB_ENDPOINT}}",
        "privacyUrl": "${{TAB_ENDPOINT}}/index.html#/privacy",
        "termsOfUseUrl": "${{TAB_ENDPOINT}}/index.html#/termsofuse"
    },
    "icons": {
        "color": "color.png",
        "outline": "outline.png"
    },
    "name": {
        "short": "Teams App ${{APP_NAME_SUFFIX}}",
        "full": "Full name for Teams App"
    },
    "description": {
        "short": "Short description",
        "full": "Full description"
    },
    "accentColor": "#FFFFFF",
    "bots": [],
    "composeExtensions": [],
    "configurableTabs": [
        {
            "configurationUrl": "${{TAB_ENDPOINT}}/config",
            "canUpdateConfiguration": true,
            "scopes": [
                "team",
                "groupChat"
            ],
            "context": [
                "meetingChatTab",
                "meetingDetailsTab",
                "meetingStage",
                "meetingSidePanel",
                "channelTab"
            ],
            "meetingSurfaces": [
                "sidePanel",
                "stage"
            ]
        }
    ],

    "permissions": [
        "identity",
        "messageTeamMembers"
    ],
    "validDomains": [
        "${{TAB_HOSTNAME}}",
        "drive.google.com",
        "${{BACKEND_API_URL}}",
        "https://www.bing.com/"
    ],
    "webApplicationInfo": {
        "id": "${{AAD_APP_CLIENT_ID}}",
        "resource": "api://${{TAB_DOMAIN}}/${{AAD_APP_CLIENT_ID}}"
    },
    "authorization": {
        "permissions": {
            "resourceSpecific": [
                {
                    "name": "MeetingStage.Write.Chat",
                    "type": "Delegated"
                },
                {
                    "name": "MeetingStage.Write.All",
                    "type": "Delegated"
                },
                {
                    "name": "ChannelMeetingStage.Write.Group",
                    "type": "Delegated"
                },
                {
                    "name": "OnlineMeeting.ReadWrite.Chat",
                    "type": "Delegated"
                },
                {
                    "name": "LiveShareSession.ReadWrite.Chat",
                    "type": "Delegated"
                },
                {
                    "name": "LiveShareSession.ReadWrite.Group",
                    "type": "Delegated"
                },
                {
                    "name": "OnlineMeeting.ReadWrite",
                    "type": "Delegated"
                },
                {
                    "name": "MeetingStage.Write.Group",
                    "type": "Delegated"
                }
            ]
        }
    }
}
Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs


1 answer

Sort by: Most helpful
  1. Sayali-MSFT 5,851 Reputation points Microsoft External Staff Moderator
    2025-03-18T08:43:02.64+00:00

    Hello @Mangesh Singh, it seems like you're encountering a permission issue when using the shareAppContentToStage API for your Teams application.
    Error: "App doesn't have sufficient permission to use this API"

    1. The issue may be related to RSC permissions not being correctly set or recognized. Hence, you need to ensure that the app has proper permissions.
    2. Verify that your app's authorization settings include the required RSC permissions.
    3. Ensure that the permissions are added correctly in the manifest.json file.

    Also, you can refer the below sample-
    https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/439640d4e37184ff60d70661b1e4c58b4611fd81/samples/meeting-tabs/nodejs

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.