Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
27 changes: 3 additions & 24 deletions src/Commands/Graph/InvokeGraphMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string> AdditionalHeaders
// {
// get
// {
// if (ConsistencyLevelEventual.IsPresent)
// {
// if (additionalHeaders == null)
// {
// additionalHeaders = new Dictionary<string, string>();
// }
// additionalHeaders.Remove("ConsistencyLevel");
// additionalHeaders.Add("ConsistencyLevel", "eventual");
// }
// return additionalHeaders;
// }
// set
// {
// additionalHeaders = value;
// }
// }
public GraphAdditionalHeadersPipeBind AdditionalHeaders = new(new Dictionary<string, string>());

[Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOFILE)]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_TOCONSOLE)]
Expand All @@ -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()
{
Expand Down Expand Up @@ -335,6 +314,6 @@ private void HandleResponse(HttpResponseMessage response)
default:
throw new Exception($"Parameter set {ParameterSetName} not supported");
}
}
}
}
}