Share via

Getting error while using PowerShell script as runbook

Jatin Lingwal 20 Reputation points
2023-05-29T12:14:57.2966667+00:00

HI, while using the app registration expiration monitoring solution

https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/app-registration-expiration-monitoring-and-notifications/ba-p/2043805

When I am trying to run The script, getting an error.

Write-Error: Automation.Sandbox.AssetManagement.Cmdlets.AssetManagementClient.AssetManagementClientException: {"type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","title":"An error occurred while processing your request.","status":500,"traceId":"00-d5f20061394818837a568d922291295c-3af7bede76f90416-00"} at Automation.Sandbox.AssetManagement.Cmdlets.AssetManagementClient.AssetManagementHttpClient.GenerateAssetManagementClientException(HttpResponseMessage response) in C:__w\1\s\src\Automation.Sandbox.AssetManagement.Cmdlets\AssetManagementClient\AssetManagementHttpClient.cs:line 206 at Automation.Sandbox.AssetManagement.Cmdlets.AssetManagementClient.AssetManagementHttpClient.GetAsset[T] in C:__w\1\s\src\Automation.Sandbox.AssetManagement.Cmdlets\AssetManagementClient\AssetManagementHttpClient.cs:line 127 at Automation.Sandbox.AssetManagement.Cmdlets.AssetManagementClient.AssetManagementHttpClient.GetVariableValue(String name) in C:__w\1\s\src\Automation.Sandbox.AssetManagement.Cmdlets\AssetManagementClient\AssetManagementHttpClient.cs:line 75 at Automation.Sandbox.AssetManagement.Cmdlets.AssetCmdlets.GetAutomationVariableCmdlet.CmdletImplementation() in C:__w\1\s\src\Automation.Sandbox.AssetManagement.Cmdlets\AssetCmdlets\GetAutomationVariableCmdlet.cs:line 20 at Automation.Sandbox.AssetManagement.Cmdlets.AssetCmdlets.AssetBaseCmdlet.ProcessRecord() in C:__w\1\s\src\Automation.Sandbox.AssetManagement.Cmdlets\AssetCmdlets\AssetBaseCmdlet.cs:line 32

I have followed the GitHub steps for the same https://github.com/Cj-Scott/Get-AppRegistrationExpiration

Azure Monitor
Azure Monitor

An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.

Windows for business | Windows Server | User experience | PowerShell

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.