diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bab36cb1..068eb2fa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed `Get-PnPAzureADAppSitePermission`, `Grant-PnPAzureADAppSitePermission` and `Revoke-PnPAzureADAppSitePermission` cmdlets throwing an error when the site URL is not specified and the app registration used only having Graph permissions [#4421](https://github.com/pnp/powershell/pull/4421) - Fixed `Get-PnPTerm` cmdlet not working correctly when `-ParentTerm` parameter is specified. [#4454](https://github.com/pnp/powershell/pull/4454) - Fixed the PnP PowerShell version check to only check nightly version in nightly builds and major version in release builds. [#4453](https://github.com/pnp/powershell/pull/4453) +- Fixed `-ConsistencyLevelEventual` flag on `Invoke-PnPGraphMethod` to work correctly. [#4523](https://github.com/pnp/powershell/pull/4523) - Fixed `Get-PnPServiceHealthIssue` returning an error when certain service states were active [#4530](https://github.com/pnp/powershell/pull/4530) ### Removed @@ -79,6 +80,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Contributors +- [reusto] - Fredrik Thorild [fthorild] - San [sankarkumar23] - Christian Veenhuis [ChVeen] @@ -535,7 +537,6 @@ Fixed app registration on Windows - Kunj Balkrishna Sangani [kunj-sangani] - Dayana Hristova [makarovv] - Rodrigo Pinto [ScoutmanPt] -- [reusto] - Reshmee Auckloo [reshmee011] - Dan Toft [Tanddant] - [reusto] diff --git a/src/Commands/Graph/InvokeGraphMethod.cs b/src/Commands/Graph/InvokeGraphMethod.cs index 468b486d0..e0222682a 100644 --- a/src/Commands/Graph/InvokeGraphMethod.cs +++ b/src/Commands/Graph/InvokeGraphMethod.cs @@ -60,31 +60,10 @@ public string Url [Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOSTREAM)] public string ContentType = "application/json"; - [Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOFILE)] [Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOCONSOLE)] [Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOSTREAM)] - public GraphAdditionalHeadersPipeBind AdditionalHeaders; - // public IDictionary AdditionalHeaders - // { - // get - // { - // if (ConsistencyLevelEventual.IsPresent) - // { - // if (additionalHeaders == null) - // { - // additionalHeaders = new Dictionary(); - // } - // additionalHeaders.Remove("ConsistencyLevel"); - // additionalHeaders.Add("ConsistencyLevel", "eventual"); - // } - // return additionalHeaders; - // } - // set - // { - // additionalHeaders = value; - // } - // } + public GraphAdditionalHeadersPipeBind AdditionalHeaders = new(new Dictionary()); [Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOFILE)] [Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOCONSOLE)] @@ -101,7 +80,7 @@ public string Url public string OutFile; [Parameter(Mandatory = true, ParameterSetName = ParameterSet_TOSTREAM)] - public SwitchParameter OutStream; + public SwitchParameter OutStream; protected override void ExecuteCmdlet() { @@ -335,6 +314,6 @@ private void HandleResponse(HttpResponseMessage response) default: throw new Exception($"Parameter set {ParameterSetName} not supported"); } - } + } } } \ No newline at end of file