Skip to content

Get-MgReportMailboxUsageDetail parser exception #190

Closed

Description

@jpalo

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?

Activity

  1. ghost removed on May 4, 2020
  2. changed the title [-]Get-MgReportMailboxUsageDetail InputObject parameter[/-] [+]Get-MgReportMailboxUsageDetail parser exception[/+] on May 4, 2020
  3. peombwa commented on May 14, 2020

    @peombwa
    Member

    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.

  4. peombwa commented on Nov 11, 2020

    @peombwa
    Member

    Duplicate of #407. Downloading of reports is being tracked by #407.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions