Hi @VIKARAN KARWASRA ,
I prepared this powershell code to enable application insight in web can you test and verify if is working for you:
# Connect to Azure
Connect-AzAccount
# Naming variables
$webappName="Your WebApp"
$webappRgName="RG of your Web App"
$appiName="Application Insight Name"
$appiRgName="RG Name of your Application Insight"
$appInsights = Get-AzApplicationInsights -ResourceGroupName $appiRgName -Name $appiName
$instrumentationKey = $appInsights.InstrumentationKey
$appSettings = @{"ApplicationInsightsAgent_EXTENSION_VERSION"="~3"; "APPINSIGHTS_INSTRUMENTATIONKEY"=$instrumentationKey}
Set-AzWebApp -ResourceGroupName $webappRgName -Name $webappName -AppSettings $appSettings
Let me know if this solve your question,
Cheers,
Luis Arias
If the information helped address your question, please Accept the answer.