I published the function to the function app and can see in the logs the following after it is published - it appears that the function is loaded and then when the host starts an unhandled exception is encountered (403 No Access) and then the Host shuts down.
---------------------------------------------------------------
2025-03-21T19:48:32.218 [Information] Starting JobHost
2025-03-21T19:48:32.220 [Information] Starting Host (HostId=func-testblobtrigger-dev-eastus, InstanceId=e2a5e03e-3081-48ec-ae08-8cf0c6abe607, Version=4.1037.1.23605, ProcessId=13396, AppDomainId=1, InDebugMode=True, InDiagnosticMode=False, FunctionsExtensionVersion=~4)
2025-03-21T19:48:32.233 [Information] Loading functions metadata
2025-03-21T19:48:33.501 [Information] Reading functions metadata (Custom)
2025-03-21T19:48:33.516 [Information] 0 functions found (Custom)
2025-03-21T19:48:33.524 [Information] 1 functions loaded
2025-03-21T19:48:33.560 [Information] Generating 1 job function(s)
2025-03-21T19:48:33.562 [Information] Worker process started and initialized.
2025-03-21T19:48:33.801 [Information] Found the following functions:
Host.Functions.Function2
2025-03-21T19:48:34.398 [Information] Initializing function HTTP routes
No HTTP routes mapped
2025-03-21T19:48:34.406 [Information] Host initialized (2174ms)
2025-03-21T19:48:34.460 [Information] HttpOptions
{
"DynamicThrottlesEnabled": false,
"EnableChunkedRequestBinding": false,
"MaxConcurrentRequests": -1,
"MaxOutstandingRequests": -1,
"RoutePrefix": "api"
}
2025-03-21T19:48:34.528 [Information] Host started (2303ms)
2025-03-21T19:48:34.528 [Information] Job host started
2025-03-21T19:48:34.730 [Error] An unhandled exception has occurred. Host is shutting down.
Azure.RequestFailedException : This request is not authorized to perform this operation.
RequestId:bbc04f74-f003-005d-2e9a-9ac21b000000
Time:2025-03-21T19:48:34.6464525Z
Status: 403 (This request is not authorized to perform this operation.)
ErrorCode: AuthorizationFailure
Content:
<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthorizationFailure</Code><Message>This request is not authorized to perform this operation.
RequestId:bbc04f74-f003-005d-2e9a-9ac21b000000
Time:2025-03-21T19:48:34.6464525Z</Message></Error>
Headers:
Server: Microsoft-HTTPAPI/2.0
x-ms-request-id: bbc04f74-f003-005d-2e9a-9ac21b000000
x-ms-client-request-id: 41b6ab3d-93a4-4baa-b4c6-f62835f4156b
x-ms-error-code: AuthorizationFailure
Date: Fri, 21 Mar 2025 19:48:34 GMT
Content-Length: 246
Content-Type: application/xml
at async Azure.Storage.Queues.QueueRestClient.GetPropertiesAsync(Nullable`1 timeout,CancellationToken cancellationToken)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Azure.Storage.Queues.QueueClient.GetPropertiesInternal(Boolean async,CancellationToken cancellationToken,String operationName)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Azure.Storage.Queues.QueueClient.ExistsInternal(Boolean async,CancellationToken cancellationToken)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Azure.Storage.Queues.QueueClient.ExistsAsync(CancellationToken cancellationToken)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners.QueueListener.ExecuteAsync(CancellationToken cancellationToken)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Extensions.Storage.Common.Timers.TaskSeriesTimer.RunAsync(CancellationToken cancellationToken)
2025-03-21T19:48:35.262 [Information] Stopping JobHost
2025-03-21T19:48:35.266 [Information] Stopping the listener 'Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners.CompositeListener' for function 'Function2'
2025-03-21T19:48:35.334 [Information] Stopped the listener 'Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners.CompositeListener' for function 'Function2'
2025-03-21T19:48:35.340 [Information] Job host stopped