Error Installing App in Microsoft Bot Multi-Tenant Project: Required Permissions Not Consented!

abbas izadipour 210 Reputation points
2024-08-01T16:39:45.41+00:00

I am working on a Microsoft bot project, a multi-tenant solution we'll call Project A. The project is functioning well in all intended aspects. Currently, I am adding a new module to this project. This module is designed to be called by an API in my index.js file and should perform the following actions:

  1. Receive a tenantId, a UPN, and a teamName.
  2. Create a new team within the given tenantId named teamName with the user identified by the provided UPN as the owner and only member.
  3. Upload an application using the application's ID from the app catalog.

Here is the code I have written for this purpose:

javascriptCopy code
require

Testing the Module and Results:

I am using my Microsoft developer account as the testing environment. I have registered Project A in my developer account, and all my tests are conducted within this account. To test the new module and API, I select an existing application from the app catalog via my admin team and use its appId in my module. The module successfully creates a new team and installs the application without any issues.

Before proceeding to the next step of testing, I want to emphasize that Project A has been tested multiple times by manually uploading the manifest zip package to various teams within my developer account.

Now, I upload Project A's manifest zip package file through the Teams admin center using "Teams app," "Manage apps," and then use Project A's app ID as the appId in the module. Upon calling the API, the module creates the new team but returns the following error:

cssCopy code
Error creating team and installing app: Error: Error installing app: Bad Request, {"error":{"

Question:

My understanding of this error is that the app’s permission to upload an application has not been consented to by the admin. However, the permissions are consented, and the app can upload other existing apps without any issues. Could someone help me understand why this error is occurring and how to resolve it?

Thank you in advance for your assistance!

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,205 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Nivedipa-MSFT 3,011 Reputation points Microsoft Vendor
    2024-09-10T06:11:00.74+00:00

    @abbas izadipour -
    The problem is with the RSC permission. Could you please verify if the app RSC permission is granted to your app?

    To verify the app RSC permissions, follow these steps:

    1. Obtain an access token from the Microsoft identity platform.
    2. Check the RSC permissions granted to a specific resource.

    If the RSC permissions are not granted to your app, refer to the following document to configure consent settings:
    https://video2.skills-academy.com/en-us/microsoftteams/platform/graph-api/rsc/grant-resource-specific-consent#configure-consent-settings

    0 comments No comments

  2. Nivedipa-MSFT 3,011 Reputation points Microsoft Vendor
    2024-09-10T06:13:03.7566667+00:00

    The problem is with the RSC permission. Could you please verify if the app RSC permission is granted to your app?

    To verify the app RSC permissions, follow these steps:

    1. Obtain an access token from the Microsoft identity platform.
    2. Check the RSC permissions granted to a specific resource. If the RSC permissions are not granted to your app, refer to the following document to configure consent settings:
      https://video2.skills-academy.com/en-us/microsoftteams/platform/graph-api/rsc/grant-resource-specific-consent#configure-consent-settings

Your answer

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