Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Function not running with failure message as "The user name or password is incorrect"

Out of blue, I am getting below error when trying to run azure function app url from browser. When i started to explore about issue , I found a few check list .

  1. checked WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and AzureWebJobsStorage using same storage accounts.
  2. Not deployed azure function app for couple of days.

Unable to get issue details from Kudo/console. When i try to hit from app service editor, i am receiving Internal Server Error

I am still unable find root cause for this issue.

enter image description here

enter image description here

App Settings of function app:

[
  {
    "name": "AppConfigEndpoint",
    "value": "https://test-euw-onlineservicehub-appconfig.azconfig.io",
    "slotSetting": false
  },
  {
    "name": "AppConfigEnvironmentName",
    "value": "dev",
    "slotSetting": false
  },
  {
    "name": "APPINSIGHTS_INSTRUMENTATIONKEY",
    "value": "INSTRUMENTKEYUSED",
    "slotSetting": false
  },
  {
    "name": "AzureWebJobs.FetchNotificationCodes.Disabled",
    "value": "1",
    "slotSetting": false
  },
  {
    "name": "AzureWebJobs.FetchProfileCodes.Disabled",
    "value": "1",
    "slotSetting": false
  },
  {
    "name": "AzureWebJobs.SendNotification.Disabled",
    "value": "1",
    "slotSetting": false
  },
  {
    "name": "AzureWebJobsDisableHomepage",
    "value": "true",
    "slotSetting": false
  },
  {
    "name": "AzureWebJobsStorage",
    "value": "STORAGECONNECTINGSTRING",
    "slotSetting": false
  },
  {
    "name": "FUNCTIONS_EXTENSION_VERSION",
    "value": "~4",
    "slotSetting": false
  },
  {
    "name": "FUNCTIONS_WORKER_RUNTIME",
    "value": "dotnet",
    "slotSetting": false
  },
  {
    "name": "NotificationsTopicName",
    "value": "notificationdetails-sbt",
    "slotSetting": false
  },
  {
    "name": "ServiceBusConnectionString",
    "value": "@Microsoft.KeyVault(VaultName=dev-euw-osh-backend-kv;SecretName=ServiceBusConnectionString)",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
    "value": "STORAGECONNECTINGSTRINGSAMEASUSEDINAzureWebJobsStorage",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_CONTENTSHARE",
    "value": "dev-euw-osh-shared-func",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_RUN_FROM_PACKAGE",
    "value": "1",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_TIME_ZONE",
    "value": "UTC",
    "slotSetting": false
  }
]

I had done recently some setting to storage account:

  1. Changed Permitted scope for copy operation from Any storage account to storage account with in same Azure AD tenant.( storage account -->configuration). All my azure functions resides in same tenant.

  2. File share max compatibility. - Changed security profile from Maximum compatibility to maximum security.(Storage account-->File Shares -- > Maximum Security)

  3. unchecked Cross-tenant replication in Storage account-->Object replication-- > Advance Settings-->uncheck

  4. soft delete enabled.

Note: I developed azure functions using .NET6 with C# language.

like image 337
PavanKumar GVVS Avatar asked Nov 15 '25 16:11

PavanKumar GVVS


2 Answers

Make sure that the credentials/connection strings being used by your Azure Function app are valid and have the necessary permissions to access the storage account.

This issue mostly occurs if there are any changes made to the storage account.

  • If you have made any changes to storage account, you have to update the connection strings in the App settings of function app as mentioned in the GitHub Issue.

  • Try re-deploying your function App.

  • Create a new storage account and try to update the connection string and other related values accordingly in the App Settings of function app.

  • Check the logs in Functionapp=>Application insights=>Logs for detailed error message:

enter image description here

  • You can also check the logs in Function App=>LogStream as well.

enter image description here

References:

Azure Function deploy fails with The user name or password is incorrect · Issue #6513 · microsoft/azure-pipelines-tasks · GitHub

like image 79
Pravallika KV Avatar answered Nov 18 '25 05:11

Pravallika KV


Storage connection string is old. Update WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and AzureWebJobsStorage in your Environment Variables in the Function App service

like image 45
rudymiked Avatar answered Nov 18 '25 05:11

rudymiked



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!