Skip to content

Get-MgReportMailboxUsageDetail parser exception #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jpalo opened this issue May 4, 2020 · 2 comments
Closed

Get-MgReportMailboxUsageDetail parser exception #190

jpalo opened this issue May 4, 2020 · 2 comments

Comments

@jpalo
Copy link

jpalo commented May 4, 2020

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?

@ghost ghost added the ToTriage label May 4, 2020
@jpalo jpalo closed this as completed May 4, 2020
@ghost ghost removed the ToTriage label May 4, 2020
@jpalo jpalo reopened this May 4, 2020
@jpalo jpalo changed the title Get-MgReportMailboxUsageDetail InputObject parameter Get-MgReportMailboxUsageDetail parser exception May 4, 2020
@peombwa
Copy link
Member

peombwa commented May 14, 2020

@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
Copy link
Member

peombwa commented Nov 11, 2020

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

@peombwa peombwa closed this as completed Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants