-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to execute action botFramework/create #11100
Comments
@nliu-ms It looks like it is not the same issue, in my case the error says: "The Microsoft App ID is already registered to another bot application" Also, when I remove the bot id, I get the following error: Unable to execute action botAadApp/create. Error message: {"error":{"code":"Authorization_RequestDenied","message":"Insufficient privileges to complete the operation.","innerError":{"date":"2024-03-19T10:23:41","request-id":"a18b86e7-a8f7-475c-9f65-93d4c595c473","client-request-id":"a18b86e7-a8f7-475c-9f65-93d4c595c473"}}} [Error] - code:botAadAppCreate.HttpClientError, message: A http client error happened while performing the botAadApp/create task. The error response is: {"error":{"code":"Authorization_RequestDenied","message":"Insufficient privileges to complete the operation.","innerError":{"date":"2024-03-19T10:23:41","request-id":"a18b86e7-a8f7-475c-9f65-93d4c595c473","client-request-id":"a18b86e7-a8f7-475c-9f65-93d4c595c473"}}} Alternatively, you can bypass this step by selecting the 'Debug in Test Tool' option. When running in debug in test tool it works. |
@kuojianlu can you please help to take a look? |
@Naperk Can you please remove |
@kuojianlu I already did that in my previous comment, but I will do it again: I get the error mentioned above: Unable to execute action botAadApp/create. Error message: {"error":{"code":"Authorization_RequestDenied","message":"Insufficient privileges to complete the operation.","innerError":{"date":"2024-03-19T10:23:41","request-id":"a18b86e7-a8f7-475c-9f65-93d4c595c473","client-request-id":"a18b86e7-a8f7-475c-9f65-93d4c595c473"}}} [Error] - code:botAadAppCreate.HttpClientError, message: A http client error happened while performing the botAadApp/create task. The error response is: {"error":{"code":"Authorization_RequestDenied","message":"Insufficient privileges to complete the operation.","innerError":{"date":"2024-03-19T10:23:41","request-id":"a18b86e7-a8f7-475c-9f65-93d4c595c473","client-request-id":"a18b86e7-a8f7-475c-9f65-93d4c595c473"}}} Alternatively, you can bypass this step by selecting the 'Debug in Test Tool' option. When running in debug in test tool it works. |
@Naperk It seems that you do not have the permission to create a Microsoft Entra App, can you please check manually if you can create an app with the same M365 account? |
Yes, I don't have permissions to do so, therefore, I asked the admin to create one for me. By doing so, I fixed that problem, I was able to run debug on teams (Edge) and upload the app, but now when sending a message to the bot in Teams, I see this error on the terminal:
I do see the bot id in the botframework page under my bots (https://dev.botframework.com/bots/) It caught my attention that it shows issues in the webchat, not in Teams, when sending a message: |
@Naperk Or you can create a new Microsoft App for Teams Bot with Multitenant. You can follow below steps to create one.
When the Microsoft App is created, paste the Application (client) ID into
Paste the Client Secret into
Then debug again. |
@kuojianlu But now, I get this error: [onTurnError] unhandled error: RestError: Authorization has been denied for this request. [onTurnError] unhandled error: RestError: Authorization has been denied for this request. [onTurnError] unhandled error: RestError [onTurnError] unhandled error: RestError |
@Naperk Sorry about that, I just verified that the bot created by So the fix can be one of the followings: First option: Second option:
|
@xzf0587 I got permissions and I was able to deploy and run a couple of sample bots in JS, thank you very much!. But now, I would need to integrate a python bot, I found some examples in teams ai library in python, but when deploying they don't work. I found there are other parameters set in the azure.bicep, for example python and its version, is there a way to update the resources based on the other file, or do i need to set up everithing again, and ask for a new provision? I mean, do we need to set up a new entra app, key, set scopes and create new resources or is there a faster way to update them? |
@Naperk can you share the azure.bicep and azure.parameters.json in the python project. |
Hi @Naperk , If you want to use Python bot, I'm afraid that you have to create a new web app bot service for your Python app. It is because that Python container for bot service can only be supported by linux os in Azure, which is different from Windows os for JS template. We need different web app service resources for different languages. You can quickly scaffold a custom-copilot-basic chat bot template python app with latest pre-release Teams Toolkit to have a try. Thanks~ |
@frankqianms Thank you very much! |
@frankqianms I found it is possible to change some settings in the Azure Portal, the template that you shared had the following property: I replaced the last part But, I included some code to use langchain and connect to a db, in order to answer questions, I debugged it locally and it is working as expected, but it does not in the web app hosted in Azure services, is there some way to debug it apart from checking the application logs? I went to diagnose and solve problems in Azure Portal and I found this: And this is what I see in application logs: A detail of the logs:
It looks like it didn't installed unidecode successfully, but I had poetry already installed when installing the packages in the environment, Should I do something else to handle the dependencies? Are there any steps or guide to follow? Some other context comments, but I don't think they are useful: This is what I see in the platform logs: (I am using only OpenAI API, not Azure OpenAI) The output of the deployment looks good:
|
@Naperk Yes. You can set them in any ways after provision. The toolkit prefers to set them in bicep because the manual settings will lose after re-provision. If the resource will not be re-provisioned or you can set them after every provision. It could be OK. |
Thank you very much @xzf0587 ! |
Hi @Naperk, As far as I know, you have to write all the dependencies in a You can refer to this doc for more informatin: https://learn.microsoft.com/en-us/azure/app-service/configure-language-python#customize-build-automation Thank you very much~ |
Thank you very much for all the help! I was able to get the bot running. Just one more question, do you know how could I include the context, I mean the chat or conversation history? |
Teams bot is driven by event. In the context, you can get the conversation message. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
Thank you very much @xzf0587! I was able to find the field to set the conversation history |
Describe the bug
When trying to create a Teams App using visual studio toolkit I got the following error:
[2024-03-15T12:36:11.123Z] [Error] - Unable to execute action botFramework/create. Error message: API call to Developer Portal failed. Check Output panel for details.
[2024-03-15T12:36:11.130Z] [Error] - Failed to Execute lifecycle provision due to failed action: botFramework/create. DeveloperPortalAPIFailedError:API call to Developer Portal failed: AxiosError, Request failed with status code 400, API name: create-bot, X-Correlation-ID: 53f2054f-e1e1-4e42-95da-67cb087cfd39. This may come from some intermittent service error. Please wait for a few minutes and retry the current step. data: "The Microsoft App ID is already registered to another bot application.". Env output: {"TEAMS_APP_ID":"","TEAMS_APP_TENANT_ID":"","BOT_ID":"","SECRET_BOT_PASSWORD":"****"}
Additional context
I am debugging the app locally.
The bot was already created in Azure Bot Service, I am using the BOT_ID and the SECRET_BOT_PASSWORD.
The text was updated successfully, but these errors were encountered: