If the user is trying to populate a Token binding and the request is unauthenticated, the request returns the following stack trace:
An unhandled exception occurred while processing the request. InvalidOperationException: Error while accessing 'X-MS-TOKEN-AAD-ID-TOKEN': property doesn't exist. Microsoft.Azure.WebJobs.Host.Bindings.Path.BindingTemplateToken+ExpressionToken.Evaluate(IReadOnlyDictionary<string, object> bindingData) in BindingTemplateToken.cs, line 198 InvalidOperationException: Exception binding parameter 'graphToken' Microsoft.Azure.WebJobs.Host.Executors.DelayedException.Throw() in DelayedException.cs, line 27 FunctionInvocationException: Exception while executing function: Functions.ProfilePhotoAPICSharp1 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
We should handle this internal exception and return a message that more clearly indicates that the user isn't authenticated, so we can't populate the Auth token value.
If the user is trying to populate a Token binding and the request is unauthenticated, the request returns the following stack trace:
An unhandled exception occurred while processing the request. InvalidOperationException: Error while accessing 'X-MS-TOKEN-AAD-ID-TOKEN': property doesn't exist. Microsoft.Azure.WebJobs.Host.Bindings.Path.BindingTemplateToken+ExpressionToken.Evaluate(IReadOnlyDictionary<string, object> bindingData) in BindingTemplateToken.cs, line 198 InvalidOperationException: Exception binding parameter 'graphToken' Microsoft.Azure.WebJobs.Host.Executors.DelayedException.Throw() in DelayedException.cs, line 27 FunctionInvocationException: Exception while executing function: Functions.ProfilePhotoAPICSharp1 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
We should handle this internal exception and return a message that more clearly indicates that the user isn't authenticated, so we can't populate the Auth token value.