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:
- Receive a
tenantId
, a UPN
, and a teamName
.
- Create a new team within the given
tenantId
named teamName
with the user identified by the provided UPN
as the owner and only member.
- 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!