Share via

Azure function fails with FunctionInvocationException

Walter Cabrera 1 Reputation point
2023-01-09T14:36:56.193+00:00

A project is having trouble with microsoft identity in azure. it is running asp.net MVC

Microsoft.Azure.WebJobs.Host.FunctionInvocationException:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+

Azure Functions
Azure Functions

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


1 answer

Sort by: Most helpful
  1. Michael Taylor 61,221 Reputation points
    2023-01-09T16:29:29.227+00:00

    Just looking at the exception trace you can see the exception you got was caused by a TypeInitializationException which means an exception occurred while trying to load a type at startup. Going further down the exception chain there is an exception trying to set up IdentityServer. Following it further it appears to be an authentication/connection issue. The stack trace shows KeyVaultCredential which leads me to believe either there is a credential that is bad or it cannot get to KV. You'll probably need to dig into your logs to ensure everything is configured properly.

    0 comments No comments

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.