Skip to content

Invoke-MgGraphRequest should throw an error when it can't process non-JSON responses #1425

Closed
@peombwa

Description

@peombwa

Invoke-MgGraphRequest should throw an error requiring -OutputFilePath when it can't process non-JSON responses and the OutputType is not HttpResponseMessage.

Repro steps

Connect-MgGraph
Welcome To Microsoft Graph!Invoke-MgGraphRequest -Uri "v1.0/users/$userId/messages/$messageId/`$value" # Should throw an error requiring -OutputFilePath.`Invoke-MgGraphRequest -Uri "v1.0/users/$userId/messages/$messageId/`$value" -OutputFilePath MessageContent.txt # works

Invoke-MgGraphRequest should also honor -OutputType HttpResponseMessage.

Invoke-MgGraphRequest -Uri "v1.0/users/$userId/messages/$messageId/`$value" -OutputType HttpResponseMessage

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions