Open joshtransient opened 3 weeks ago
@joshtransient - appreciate your feedback. We will update this in v3 to a hashtable.
It is not a bug, will consider this as enhancement though. Can't change it in current versions, 2.x, as it will be a breaking change.
Reporting an Issue or Missing Feature
I'm considering this an issue (not a feature request) since I'd expect others to also file this as a bug. I'm all for using generics for type safety, but...come on. I shouldn't have to cast a whole new dictionary on a separate line just to use this argument.
Expected behavior
The
-AdditionalHeaders
argument ofInvoke-PnPGraphMethod
should accept a hashtable the sake of simplicity and readability.Actual behavior
When using a hashtable in the
-AdditionalHeaders
argument ofInvoke-PnPGraphMethod
, I receive the error message:The workaround is:
Steps to reproduce behavior
Sample command (Connected to PnP with
-Interactive
or an app registration with User.Read.All):What is the version of the Cmdlet module you are running?
2.4.0
Which operating system/environment are you running PnP PowerShell on?