Skip to content

Allow me to get back the raw JSON output from any request easily with a -Raw common parameter #454

@KirkMunro

Description

@KirkMunro

I would like to be able to invoke any Graph cmdlet with a -Raw common parameter, with the results of that invocation returning the raw JSON output from the web request. This would be very helpful because Graph cmdlets allow me to easily write a command in a self-documenting way using PowerShell syntax while allowing me to get back the raw JSON output without it being processed/converted into custom objects for scenarios where I want to pass that JSON off to another service.

Today there are many scenarios where I am invoking Graph cmdlets, which then send receive results in JSON, convert it into objects, which I then convert back into JSON to send off to another service for processing. I'd like to avoid the overhead involved in converting from JSON to objects and then back into JSON, especially since the JSON isn't always converted into objects in a way that I would expect.

I know that I can use Invoke-MgGraphRequest to achieve this; however, that removes the benefit of being able to write self-documenting script logic that leverages PowerShell's strengths. A -Raw common parameter to get back just the JSON would give me the best of both worlds when I need it.
AB#7373

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions