Share via

Unable to start timer function.

Sukesh 35 Reputation points
2023-06-07T06:11:01.78+00:00

Listener was unable to start function timer.

Diagnosis shows azure.blobs AuthorizationPermissionMismatch.

please help!

thanks in advance .

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

Answer accepted by question author

Sedat SALMAN 14,455 Reputation points MVP
2023-06-07T07:08:52.3666667+00:00

https://learn.microsoft.com/en-us/answers/questions/798867/code-authorizationpermissionmismatch

https://stackoverflow.com/questions/52769758/azure-blob-storage-authorization-permission-mismatch-error-for-get-request-wit

Ensure that the Azure Function has the necessary permissions to interact with the Azure Storage Blob. This typically requires the Azure Function to have the Storage Blob Data Contributor role. If you're using azcopy or similar tools, the account used might also need Owner permissions on the blob storage​

or

If you're using a method like GetAccessTokenAsync to generate access tokens for Azure Storage, ensure that the resource requested is the URL of your storage blob, not a general storage URL like

"https://storage.azure.com"​``oaicite:{"number":2,"metadata":{"title":"Azure

Blob Storage

"Authorization Permission Mismatch" error for get request with AD token - Stack Overflow",

"url":"https://stackoverflow.com/questions/52769758/azure-blob-storage-authorization-permission-mismatch-error-for-get-request-wit","text":"I've

just solved this by changing the resource requested in the GetAccessTokenAsync method from "[https://storage.azure.com](https://storage.azure.com%5C/)" to the url of my storage blob as in this snippet:

public async Task<StorageCredentials> CreateStorageCredentialsAsync()
 {
 var provider = new AzureServiceTokenProvider();
 var token = await provider.GetAccessTokenAsync(AzureStorageContainerUrl);
 var tokenCredential = new TokenCredential(token);
 var storageCredentials = new StorageCredentials(tokenCredential);
 return storageCredentials;
}

where AzureStorageContainerUrl is set to

https://xxxxxxxxx.blob.core.windows.net","pub_date":null}}``&#8203;.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.