Repository navigation
Closed
Description
Get-MgReportMailboxUsageDetail -Period "'D7'"throws the following error:
DEBUG: CmdletBeginProcessing:
DEBUG: CmdletProcessRecordStart:
DEBUG: CmdletProcessRecordAsyncStart:
DEBUG: CmdletGetPipeline:
DEBUG: CmdletBeforeAPICall:
DEBUG: URLCreated: https://graph.microsoft.com/beta/reports/microsoft.graph.getMailboxUsageDetail(period=%27D7%27)
DEBUG: RequestCreated: https://graph.microsoft.com/beta/reports/microsoft.graph.getMailboxUsageDetail(period=%27D7%27)
DEBUG: HeaderParametersAdded: https://graph.microsoft.com/beta/reports/microsoft.graph.getMailboxUsageDetail(period=%27D7%27)
DEBUG: BeforeCall:
DEBUG: ResponseCreated:
DEBUG: BeforeResponseDispatch:
DEBUG: Finally:
DEBUG: CmdletProcessRecordAsyncEnd:
DEBUG: CmdletException: ParserException - Expected '{' or '['. Was String: Report. : at Microsoft.Graph.PowerShell.Runtime.Json.JsonParser.ReadNode()
at Microsoft.Graph.PowerShell.Runtime.Json.JsonNode.Parse(SourceReader sourceReader)
at Microsoft.Graph.PowerShell.Runtime.Json.JsonNode.Parse(String text)
at Microsoft.Graph.PowerShell.Runtime.Json.JsonArray.Parse(String text)
at Microsoft.Graph.PowerShell.Reports.<>c.<ReportsGetMailboxUsageDetail_Call>b__83_0(Task`1 body)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Graph.PowerShell.Cmdlets.GetMgReportMailboxUsageDetail_Get.onOk(HttpResponseMessage responseMessage, Task`1 response)
at Microsoft.Graph.PowerShell.Reports.ReportsGetMailboxUsageDetail_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Graph.PowerShell.Reports.ReportsGetMailboxUsageDetail_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Graph.PowerShell.Reports.ReportsGetMailboxUsageDetail(String period, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Graph.PowerShell.Cmdlets.GetMgReportMailboxUsageDetail_Get.ProcessRecordAsync()
at Microsoft.Graph.PowerShell.Cmdlets.GetMgReportMailboxUsageDetail_Get.ProcessRecordAsync()
Get-MgReportMailboxUsageDetail_Get: Expected '{' or '['. Was String: Report.
DEBUG: CmdletProcessRecordEnd:
DEBUG: CmdletEndProcessing:
EDIT: Apparently related to this microsoftgraph/msgraph-sdk-dotnet-core#32
Is there any way to work around the issue e.g., with -HttpPipelineAppend?
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Get-MgReportMailboxUsageDetail InputObject parameter[/-][+]Get-MgReportMailboxUsageDetail parser exception[/+]peombwa commentedon May 14, 2020
Jussi Palo (@jpalo) Thanks for informing us about this.
This is an issue with the code generator that we using to generate the cmdlets - it doesn't handle non JSON responses. We are currently work on a fix for this as part of work item #182.
peombwa commentedon Nov 11, 2020
Duplicate of #407. Downloading of reports is being tracked by #407.