Azure / Azure/azure-functions-host

Unable to get table reference or create table. Aborting write operation.

Open
#10,995 27 comments 11 reactions 0 assignees View on GitHub
Logging and Metrics supportability
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

Previous function runtime: 4.1037.1.23605
Current function runtime: 4.1038.300.25164

After the function runtime version has been updated to 4.1038 then our function app periodicaly every 10 minutes reports the exception:

_"Unable to get table reference or create table. Aborting write operation."_

Message:
```
This request is not authorized to perform this operation using this permission.
Time:2025-04-11T11:38:55.5555894Z
Status: 403 (Forbidden)
ErrorCode: AuthorizationPermissionMismatch
```

The execption originates in:
`{"assembly":"Microsoft.Azure.WebJobs.Script.WebHost, Version=4.1038.0.0, Culture=neutral, PublicKeyToken=null","method":"Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.DiagnosticEventTableStorageRepository+d__30.MoveNext","level":34,"line":195,"fileName":"/_/src/WebJobs.Script.WebHost/Diagnostics/DiagnosticEventTableStorageRepository.cs"}`

Granting the function app: "StorageTableDataContributor" RBAC role on the storage enables the function app to create an empty table in the storage.

Why is it now a requirement that this empty table must be created?
How do we disable this so we can have the old functionallity back?

It is NOT an option to grant this RBAC role to all function apps, we do not need this and wont grant access that is not required otherwise.

The guide:
https://learn.microsoft.com/en-us/azure/azure-functions/storage-considerations?tabs=azure-cli

Does not explain that the access is required. Is it something that is on its way?

Contributor guide

Open the contributing guide

Research direction

Start with Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.DiagnosticEventTableStorageRepository, especially FlushLogs at DiagnosticEventTableStorageRepository.cs line 195, and compare behavior between runtimes 4.1037.1.23605 and 4.1038.300.25164. Review the linked storage considerations guide and determine whether table creation is required and whether a supported disable or reduced-permission path exists; document the resulting behavior or configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.