Error while running Azure Web Job.

Priya Pinto 1 Reputation point

Azure web job gives error while running. Its saying Storage account credentials are incorrect. But we have checked the AzureWebJobsStorage and AzureWebJobsDashboard keys and its pointing to correct StorageConnectionString.

Also, both the settings 'Storage account key access' and 'Public network access' are Enabled for storage account.

Could you help in figuring out what exactly is the issue, as no other storage account facing similar issue?

  1. Deleted

    This comment has been deleted due to a violation of our Code of Conduct. The comment was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

  2. Pravallika KV 17,025 Reputation points Microsoft External Staff Moderator

    Hi @Priya Pinto , Is this running under WebJobs SDK (App Service WebJob) or is it actually an Azure Function (which uses the WebJobs SDK under the hood)?

  3. Golla Venkata Pavani 6,085 Reputation points Microsoft External Staff Moderator

    Hi @Priya Pinto

    Thank you for reaching us regarding the issue.

    Please provide answer for the below question to investigate the issue further

    • Just to confirm, is this implemented as an App Service WebJob using the WebJobs SDK, or as an Azure Function that utilizes the WebJobs SDK behind the scenes?
  4. Priya Pinto 1 Reputation point

    Its an App Service WebJob using WebJobs SDK. There was no tag for Azure WebJobs in your list thats's why I had added Azure Functions as a tag.


Sign in to comment

1 answer

  1. AI answer

    Based on the error and the checks already done, focus on validating the AzureWebJobsStorage configuration and the storage account’s ability to serve as host storage for the web job (Functions runtime):

    1. Confirm AzureWebJobsStorage is present and valid
      • Ensure the app setting AzureWebJobsStorage exists on the Web App/WebJob and is not empty or misspelled.
      • Verify it is a full storage connection string of a general-purpose storage account that supports blobs, queues, and tables, for example:
         DefaultEndpointsProtocol=https;AccountName=<name>;AccountKey=<key>;EndpointSuffix=core.windows.net
        
      • If the connection string is invalid or points to a non‑compatible account, the runtime raises errors like “storage credentials are incorrect.”
    2. Check for invalid or stale credentials
      • If the storage account access keys were regenerated after the app setting was configured, the connection string in AzureWebJobsStorage becomes invalid.
      • Regenerate a fresh connection string from the storage account (Access keys blade) and paste it into AzureWebJobsStorage.
      • This resolves scenarios where diagnostics report invalid credentials or StorageException when connecting to storage.
    3. Verify access to all required storage services
      • The storage account referenced by AzureWebJobsStorage must allow access to Table Storage and support read, write, delete, add, and create operations.
      • If the account or its configuration blocks these operations (for example, via permissions or network rules), the runtime logs errors like AZFD0003.
    4. Check network/firewall configuration beyond “Public network access: Enabled”
      • Even with public access enabled, ensure no firewall rules or virtual network restrictions are blocking the app from reaching the storage account.
      • The app must be able to reach blobs, queues, and tables using the connection string.
    5. Avoid using a Key Vault reference in AzureWebJobsStorage (unless explicitly supported)
      • If AzureWebJobsStorage is set to a Key Vault reference instead of a connection string, this can trigger diagnostic events like AZFD0002 (invalid value) unless the scenario is configured to use identity-based host storage.
      • For classic WebJobs/Functions scenarios, keep AzureWebJobsStorage as a direct connection string unless specifically configured for identity-based connections.
    6. Compare with a working storage account
      • Since other storage accounts work, compare:
        • Connection string format and keys.
        • Storage account type (must be general-purpose with blobs/queues/tables).
        • Any differences in firewall or network settings.

    If after these checks the error persists, capture the exact diagnostic event IDs (e.g., AZFD0001, AZFD0002, AZFD0003) from Functions diagnostics; they directly indicate whether the app setting is missing, invalid, or failing to access storage.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.
Sign in to answer

Your answer