Error while creating bot - azure

I am getting error while creating bot. I am trying to deploy a Web app bot. After specifying the name of resource group and their location I click on create. After which bot deployment process starts. But it ends up with an error:
MsaAppId: MsaAppId is already in use..
What can I do successfully deploy a basic bot. This is second time in a week, I am facing something like this on Azure.
Edit
Initially I was using Autocreate MsaAppId & Password option. That didn't work out (although that used to work)
Then I tried a couple of times with Create MsaAppId & Password option. Which takes to a different page to generate AppId & password, and I pasted the new keys in the provided fields.
Still the same result. MSA App Id already in use
Edit 2
As one of the answer mentioned, I tried creating a separate Bot Registration which I will link up with the Web app later.
But that fails with a weird message saying, App Insights is already deployed, and cannot deploy with same name, when in fact, I have not asked for any new App Insights instance to be deployed. Attaching a screenshot

it ends up with an error:
MsaAppId: MsaAppId is already in use..
I have same problem, when I create the web app bot (select Auto create App ID and password option), it failed at creating botServices resource.
Deployment:
Failed operation details:
I also tried to manually create app on https://apps.dev.microsoft.com and provide App ID and password for creating botService, but the deployment still failed.
As a workaround, I manually created Bot Channels Registration and specify corresponding web application URL as message endpoint, and then modify Application settings of that corresponding Azure web site with new App ID and password, which works for me.
Note:
I suspect something wrong with Azure while performing deployment and creating botServices, if possible, you can report it on Azure portal or create an issue on github.
Updated:
I click Automation options and download the template after I enter the required information/fields for creating a new web app bot, and then I perform deployment by using powershell with downloaded template&parameter file, which work for me, you can try it.

Related

AZURE WEB APP: Problem: fatal: Authentication failed for 'webapp url'

Good day I am new on web developing and want to ask on how to fix this error in the terminal of Azure webapp service, git push azure main this is the command I keep inserting inside the terminal but the response is always this Password for <webapp url> and I don't know what password I should enter
therefore I browse the internet and still stuck on this, the fixes I tried is removing some credentials on windows credential, changing the HTTPS to SSHS, configuring global password, and lastly installing the GCM from github thank you very much
In Azure Portal, first we need to create Azure App service with the required run time stack.
You will get this option, if we deploy our App using Local Git.
We need to provide Credentials while pushing the code from local GitHub.
You will get the Credentials from Azure Portal => App Service.
Navigate to Azure Portal => Your App Service (which you have created in first step) => Deployment Center => Local Git/ FTPS credentials.
We can use the existing Application scope Username and Password or can create new User scope and use them.

How to change Azure App Services Github workflow deployment environment name

When you create an app there's no option to customize this, it's just there by default.
This matters because sometimes I don't want github actions to say that I'm deploying to "production", I want it to say I'm deploying to "development". But if I change this property manually, I'll get an error in github actions saying: Error: Deployment Failed with Error: Error: Publish profile is invalid for app-name and slot-name provided. Provide correct publish profile credentials for app. But then as soon as it's changed back the deployment works again, so I need to find a way to change this property in Azure?
Always the main slot of the webapp is called production, there is no way to change it.

Accessing a Azure Key Vault secret works on server box but not local?

We have a Key Vault in a resource group in an Azure instant.
We have a user in the US (ME) and a user in different country (FU).
Both of use have many things in common, namely:
Using same version of VS 2017.
Running the exact same code.
Our VS user account is the same (a user in our Azure AD instance).
We are using a Managed Identity
If I run the code in US (logged in in VS as the FU), I am able to read the secret and display on the screen.
If the FU(logged in in VS as the FU but in another country), when he runs the code it throws the following exception
Operation returned an invalid status code 'Unauthorized'
The line of code that throws the error is:
var secret = await keyVaultClient.GetSecretAsync("https://XXXXXXX.vault.azure.net/secrets/username")
.ConfigureAwait(false);
We have both installed Azure CLI 2.0.
However, I found these stipulations at this site.
Your on-premise active directory is synced with Azure AD.
You are running this code on a domain joined machine.
Neither of these are true in our case.
Possibly a good test of these would for our vendor to allow me to remote into his machine and put my identity on VS and then run the code.
If we still get the error, then it is very likely this is our problem.
The above link said we could "Run the application using a service principal in local development environment"
Would that fix the problem???
I am fairly new to Azure and C#. Any help would be greatly appreciated!

Azure Bot Service app doesn't load build options after changing subscription

I have a Bot App Service in the Azure Portal. I had it in a subscription under a resource group called "pnibot", then I had to move it to another subscription, now under a resource group called "PNI". The app itself is working properly.
My problem is that when I click the resource to open it and get the build options (the view that lets you open the code editor or download the source code), I get this error:
"The Resource 'Microsoft.Web/sites/pnibot' under resource group 'pnibot' was not found."
As I said the bot works properly, and I can open the other tabs with no problem (Channels, Analytics, Settings), but I need to be constantly opening this view to work on the code and sometimes download it, so this is a tedious issue. Can anyone help?

Deploy a resource group with App Service

I have published an API app from Visual Studio to a new resource group, also created an App Service Plan, so after the deployment the resource group contains 2 items:
AppServicePlan1
AppService1
Now I am trying to deploy these items to another resource group as follows:
Select 'Automation script' in the resource group settings
Click 'Deploy'
Select 'Create new' resource group, enter its name
Enter 'Serverfarms_AppServicePlan1_name' parameter value (new app service plan name, e.g. AppServicePlan2)
Enter 'Sites_AppService1_name' parameter value (new app service name, e.g. AppService2)
Tick 'Agree to terms and conditions'
Click 'Puchase'
The process fails with the following error message:
"The host name AppService1.azurewebsites.net is already assigned to another Azure website: AppService1."
I have tried different things - deploying app service plan, logic apps, etc. from one resource group to another works fine, but deploying an app service fails as described above.
I have tried changing the hostNames property in the template file to ["AppService2.azurewebsites.net"] manually - I'm not getting the error then (although I'm not sure, maybe something else also needs to be changed, e.g. properties enabledHostNames, hostNameSslStates?) and the deployment seems to work, however the 'deployed' app service can't be used as it contains only 1 file - hostingstart.html.
What am I missing?
I think you have everything correct - as you noticed when you use the generated automation script it will create everything with the same properties that currently exist. We try to parameterize the correct value (like the web app name) but there are some details that can be overlooked (like host names). After changing all that it sounds like you got it to deploy.
The "code" however is not part of the automation script - only the infrastructure and configuration. So you still need to deploy your app to have it be identical. You can folder app deployment into the JSON template (using webdeploy or github) but since that requires access to external artifacts, that's not done automatically.
That help?

Resources