Automating Azure Sentinel deployment with Powershell error - azure

https://github.com/javiersoriano/sentinel-all-in-one/blob/master/README.md
This is basically what I am trying to do. I am trying to automate the process of deploying a SIEM, Azure Sentinel to our customers' environment to save time, but I get these errors and would not process. I got the JSON file and the ps1 file in the same folder.
Error 1
I get these messages in the picture above. Then it proceeds to the next step which wants me to log in with my Azure account. I don't think I logged in but it proceeds without asking when I click enter.
Then I get these errors below:
Error 2

Related

Azure Data Factory throwing "Invoking Azure function failed with HttpStatusCode - InternalServerError."

I am getting this error while trying to invoke azure function through the data factory. Snap of the error is attached.
I then again tried with the same parameters, and the next instance of execution just worked fine.
I just wanted to know if this problem is from azure server side or due to from my code.
Any help would be appreciated.
Call to provided Azure function 'OnCopySuccess' failed with
status-'InternalServerError' and message - 'Invoking Azure function
failed with HttpStatusCode - InternalServerError.
Has nothing to do with Azure DataFactory, it fails because of the Azure Functions, HAs from the error you will not be able to detect any issues so, you may examine the output of your azure function app using logs in kudu, in addition to the monitor of the azure function.
In addition, kudu log files are more timely than the Azure function's monitor.
Simply navigate to this website's address.
Click on the URL https://yourfunctionappname.scm.azurewebsites.net/DebugConsole
Go To: LogFiles\Application\Functions\Function\yourtriggername
The log files can then be found. The log file in Kudu is real-time, whereas the monitor takes a while to show (typically 5 minutes).
HTTP Function is supposed to actually return an HTTP result, See the Original Post - So you might check your Azure Function Code.

Azure Deployement Failed

Since last month I am doing successful deployment on azure using visual Studio on Azure function App but suddenly I am start getting error while deploying.
Web deployment task failed. (Unable to perform the operation ("Create File") for the specified directory ("D:\home\site\wwwroot\bin\extensions.json")
I tried following things but in vain.
I restarted my Function app
Reset the publish key
Updating file (MobiMatterUsers\bin\extensions.json). C:\Program
Files\dotnet\sdk\2.2.105\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5):
error : Web deployment task failed. (Unable to perform the operation
("Create File") for the specified directory
("D:\home\site\wwwroot\bin\extensions.json"). This can occur if the
server administrator has not authorized this operation for the user
credentials you are using.
Kindly provide me possible solution and brief explanation why i am getting this error
Use IAM in the portal to see if you have the required rights.
Then rename the old file as it may be locked by a process.
if that doesn't work, check it local deployment still works.

"The term '***' is not recognized as the name of a cmdlet" error thrown in Azure Powershell step in Azure DevOps Pipeline

I have an Azure Powershell step in my release pipeline that calls the Invoke-RestMethod cmdlet to make a call to the kudu API.
At the point of creating the step is selected my Azure Subscription from the list of available subscriptions and it uses this to authenticate.
I was able to run the step successfully at first, getting the following output in the console log:
However, for every subsequent release now I am receiving the error ##[error]The term '***' is not recognized as the name of a cmdlet, function, script file, or operable program. with the following output:
I haven't changed the powershell that the step actually runs. Could there be an issue with the way the release pipeline is authenticating and selecting the subscription? I see in the output that the TenantId is shown as ***, which is what the error message is complaining about, could that be the source of it?
It looks like a problem in your script. *** is used to mask secret variables, so your script is probably doing something where it's trying to run the contents of a variable. Maybe something like &$TenantId.

Azure event triggered function for blob creation

I've been trying to create an azure function which will move blobs from one container to another. For this purpose, I created a function following this tutorial.
Now when I add blob in container, I can debug the rest in local. Problem starts when I try to deploy the function. I'm using CICD for function deployment. After that, when I'm trying to configure the event subscription, it's failing.
I cannot edit the ENDPOINT DETAILS when creating event subscription
If I try to "Add event grid subscription", it gives a strange error message - Deployment has failed with the following error:
{"code":"Url validation","message":"The attempt to validate the
provided endpoint
https://.azurewebsites.net/admin/extensions/EventGridExtensionConfig
failed. For more details, visit https://aka.ms/esvalidation."}
All the tutorials I found are either irrelevant or outdated. Does anyone have any suggestion what I should do or what am I doing wrong?
Thanks in adance

Error while creating bot

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.

Resources