Azure / Azure-Sentinel

Cloud-native SIEM for intelligent security analytics for your entire enterprise.
https://azure.microsoft.com/en-us/services/azure-sentinel/
MIT License
4.57k stars 3k forks source link

JumpCloud Data Connector: Unexpected Lack of 'mdm' and 'software' Log Retrieval #8310

Closed sbmatrosov closed 11 months ago

sbmatrosov commented 1 year ago

Describe the bug I have an Azure Function App that utilizes a PowerShell script to call the JumpCloud Directory Insights API and retrieves logs from different services. However, despite proper configuration, the script is not retrieving logs from some services (mdm and software).

To Reproduce Steps to reproduce the behavior:

1.Configure the Azure Function App with necessary bindings and environment variables.

  1. Specify the services for log retrieval in the JumpCloudEventTypes environment variable. 3.The script is supposed to retrieve logs from the mdm and software services among others.
  2. The script runs without any errors but does not retrieve logs from mdm and software services.

Expected behavior I expected the script to retrieve logs from all specified services, including mdm and software, and post them to the Log Analytics workspace.

Additional context We have already checked the configuration of the Azure Function App and verified that it is set up correctly to retrieve logs from the specified services. We have also tested the API separately and confirmed that it is capable of retrieving logs from the mdm and software services. This seems to be an issue with the PowerShell script or the way the Azure Function App is processing the script. link to connector https://github.com/Azure/Azure-Sentinel/tree/449788b130a598fc381ec07f967e91ee3df62787/DataConnectors/JumpCloud%20Single%20Sign%20On

v-sudkharat commented 1 month ago

Hey @RahulGGupta, Can you check it once by setting up below configurations:

  1. Select the Runtime version as - 4 image

  2. Select the PoweShell version 7.4 image

Save the changes and restart the function App

RahulGGupta commented 1 month ago

28/8/2024, 5:29:59 pm Information Executing 'Functions.JCTimerTrigger' (Reason='Timer fired at 2024-08-28T11:59:59.9988841+00:00', Id=4e3d9112-9d32-438b-b94e-4db7eb2aa9ad) 28/8/2024, 5:30:00 pm Information INFORMATION: JumpCloud timer triggered and is running on time! TIME: 08/28/2024 12:00:00 28/8/2024, 5:30:01 pm Warning The Function app may be missing a module containing the 'New-AzStorageContext' command definition. If this command belongs to a module available on the PowerShell Gallery, add a reference to this module to requirements.psd1. Make sure this module is compatible with PowerShell 7. For more details, see https://aka.ms/functions-powershell-managed-dependency. If the module is installed but you are still getting this error, try to import the module explicitly by invoking Import-Module just before the command that produces the error: this will not fix the issue but will expose the root cause. 28/8/2024, 5:30:01 pm Error 28/8/2024, 5:30:01 pm Error ERROR: The term 'New-AzStorageContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Exception : Type : System.Management.Automation.CommandNotFoundException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : The term 'New-AzStorageContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. HResult : -2146233087 TargetObject : New-AzStorageContext CategoryInfo : ObjectNotFound: (New-AzStorageContext:String) [], ParentContainsErrorRecordException FullyQualifiedErrorId : CommandNotFoundException InvocationInfo : ScriptLineNumber : 22 OffsetInLine : 15 HistoryId : 1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCstorage = New-AzStorageContext -ConnectionString $AzureWebJobsStorage PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:22 char:15 + $JCstorage = New-AzStorageContext -ConnectionString $AzureWebJobsSto … + ~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 InvocationName : New-AzStorageContext CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 22 CommandName : New-AzStorageContext TargetSite : Name : LookupCommandInfo DeclaringType : System.Management.Automation.CommandDiscovery, System.Management.Automation, Version=7.0.12.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 MemberType : Method Module : System.Management.Automation.dll StackTrace : at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context) at System.Management.Automation.CommandDiscovery.TryModuleAutoDiscovery(String commandName, ExecutionContext context, String originalCommandName, CommandOrigin commandOrigin, SearchResolutionOptions searchResolutionOptions, CommandTypes commandTypes, Exception& lastError) at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context) at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable1 useLocalScope) at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource) at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Message : The term 'New-AzStorageContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Data : System.Collections.ListDictionaryInternal Source : System.Management.Automation HResult : -2146233087 TargetObject : New-AzStorageContext CategoryInfo : ObjectNotFound: (New-AzStorageContext:String) [], CommandNotFoundException FullyQualifiedErrorId : CommandNotFoundException InvocationInfo : ScriptLineNumber : 22 OffsetInLine : 15 HistoryId : 1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCstorage = New-AzStorageContext -ConnectionString $AzureWebJobsStorage PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:22 char:15 + $JCstorage = New-AzStorageContext -ConnectionString $AzureWebJobsSto … + ~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 InvocationName : New-AzStorageContext CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 22 28/8/2024, 5:30:02 pm Warning The Function app may be missing a module containing the 'Get-AzstorageQueue' command definition. If this command belongs to a module available on the PowerShell Gallery, add a reference to this module to requirements.psd1. Make sure this module is compatible with PowerShell 7. For more details, see https://aka.ms/functions-powershell-managed-dependency. If the module is installed but you are still getting this error, try to import the module explicitly by invoking Import-Module just before the command that produces the error: this will not fix the issue but will expose the root cause. 28/8/2024, 5:30:02 pm Error 28/8/2024, 5:30:02 pm Error ERROR: The term 'Get-AzstorageQueue' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Exception : Type : System.Management.Automation.CommandNotFoundException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : The term 'Get-AzstorageQueue' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. HResult : -2146233087 TargetObject : Get-AzstorageQueue CategoryInfo : ObjectNotFound: (Get-AzstorageQueue:String) [], ParentContainsErrorRecordException FullyQualifiedErrorId : CommandNotFoundException InvocationInfo : ScriptLineNumber : 25 OffsetInLine : 6 HistoryId : 1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : if(( Get-AzstorageQueue -context $JCStorage -Name $JCQueuename -ErrorAction SilentlyContinue ).name ){ PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:25 char:6 + if(( Get-AzstorageQueue -context $JCStorage -Name $JCQueuename -Error … + ~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 InvocationName : Get-AzstorageQueue CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 25 CommandName : Get-AzstorageQueue TargetSite : Name : LookupCommandInfo DeclaringType : System.Management.Automation.CommandDiscovery, System.Management.Automation, Version=7.0.12.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 MemberType : Method Module : System.Management.Automation.dll StackTrace : at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context) at System.Management.Automation.CommandDiscovery.TryModuleAutoDiscovery(String commandName, ExecutionContext context, String originalCommandName, CommandOrigin commandOrigin, SearchResolutionOptions searchResolutionOptions, CommandTypes commandTypes, Exception& lastError) at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context) at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable1 useLocalScope) at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource) at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Message : The term 'Get-AzstorageQueue' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Data : System.Collections.ListDictionaryInternal Source : System.Management.Automation HResult : -2146233087 TargetObject : Get-AzstorageQueue CategoryInfo : ObjectNotFound: (Get-AzstorageQueue:String) [], CommandNotFoundException FullyQualifiedErrorId : CommandNotFoundException InvocationInfo : ScriptLineNumber : 25 OffsetInLine : 6 HistoryId : 1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : if(( Get-AzstorageQueue -context $JCStorage -Name $JCQueuename -ErrorAction SilentlyContinue ).name ){ PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:25 char:6 + if(( Get-AzstorageQueue -context $JCStorage -Name $JCQueuename -Error … + ~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 InvocationName : Get-AzstorageQueue CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 25 28/8/2024, 5:30:02 pm Error 28/8/2024, 5:30:02 pm Error ERROR: You cannot call a method on a null-valued expression. Exception : Type : System.Management.Automation.RuntimeException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : You cannot call a method on a null-valued expression. HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 TargetSite : System.Object CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object, System.Object) StackTrace : at CallSite.Target(Closure , CallSite , Object , Object ) at (Closure , FunctionContext ) Message : You cannot call a method on a null-valued expression. Source : Anonymously Hosted DynamicMethods Assembly HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], RuntimeException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 28/8/2024, 5:30:02 pm Error 28/8/2024, 5:30:02 pm Error ERROR: You cannot call a method on a null-valued expression. Exception : Type : System.Management.Automation.RuntimeException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : You cannot call a method on a null-valued expression. HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 TargetSite : System.Object CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object, System.Object) StackTrace : at CallSite.Target(Closure , CallSite , Object , Object ) at (Closure , FunctionContext ) Message : You cannot call a method on a null-valued expression. Source : Anonymously Hosted DynamicMethods Assembly HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], RuntimeException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 28/8/2024, 5:30:02 pm Error 28/8/2024, 5:30:02 pm Error ERROR: You cannot call a method on a null-valued expression. Exception : Type : System.Management.Automation.RuntimeException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : You cannot call a method on a null-valued expression. HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 TargetSite : System.Object CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object, System.Object) StackTrace : at CallSite.Target(Closure , CallSite , Object , Object ) at (Closure , FunctionContext ) Message : You cannot call a method on a null-valued expression. Source : Anonymously Hosted DynamicMethods Assembly HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], RuntimeException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 28/8/2024, 5:30:02 pm Error 28/8/2024, 5:30:02 pm Error ERROR: You cannot call a method on a null-valued expression. Exception : Type : System.Management.Automation.RuntimeException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : You cannot call a method on a null-valued expression. HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 TargetSite : System.Object CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object, System.Object) StackTrace : at CallSite.Target(Closure , CallSite , Object , Object ) at (Closure , FunctionContext ) Message : You cannot call a method on a null-valued expression. Source : Anonymously Hosted DynamicMethods Assembly HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], RuntimeException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 28/8/2024, 5:30:02 pm Error 28/8/2024, 5:30:02 pm Error ERROR: You cannot call a method on a null-valued expression. Exception : Type : System.Management.Automation.RuntimeException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : You cannot call a method on a null-valued expression. HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 TargetSite : System.Object CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object, System.Object) StackTrace : at CallSite.Target(Closure , CallSite , Object , Object ) at (Closure , FunctionContext ) Message : You cannot call a method on a null-valued expression. Source : Anonymously Hosted DynamicMethods Assembly HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], RuntimeException FullyQualifiedErrorId : InvokeMethodOnNull InvocationInfo : ScriptLineNumber : 41 OffsetInLine : 9 HistoryId : -1 ScriptName : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 Line : $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) PositionMessage : At C:\home\site\wwwroot\JCTimerTrigger\run.ps1:41 char:9 + $JCqueue.CloudQueue.AddMessageAsync($QueueMessage) + ~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\JCTimerTrigger PSCommandPath : C:\home\site\wwwroot\JCTimerTrigger\run.ps1 CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 41 at , C:\home\site\wwwroot\JCTimerTrigger\run.ps1: line 38 28/8/2024, 5:30:02 pm Information Executed 'Functions.JCTimerTrigger' (Succeeded, Id=4e3d9112-9d32-438b-b94e-4db7eb2aa9ad, Duration=2756ms)

v-sudkharat commented 1 month ago

@RahulGGupta, Based on the invocations, the logs, the function app still running on Poweshell version 7 or need to generate new logs with 7.4. Could you please verify the configuration again, and wait for some time to generate new logs

RahulGGupta commented 1 month ago

i just verified its 7.4 only and in notification functionapp1 its also giving above errors

RahulGGupta commented 1 month ago

the trigger is not working since 5:29 PM, once we changed the powershell and python to 4

28/8/2024, 5:29:59 pm  Success 0 2756 bf785c139083174b9a5ef1433874343e