Description
Describe the bug
After updating the SDK to V2.26, the New-MgGroupMember cmdlet fails with an "Invalid format specified in payload" error. It seems like there's an unresolved reference for the new group member ($ref) at the end of the URL generated for the request.
Expected behavior
I expect New-MgGroupMember to work!
How to reproduce
New-MgGroupMember -GroupId $GroupId -DirectoryObjectId $User.Id -debug
DEBUG: CmdletBeginProcessing:
DEBUG: CmdletProcessRecordStart:
Confirm
Are you sure you want to perform this action?
Performing the operation "New-MgGroupMember_CreateExpanded" on target "Call remote 'CreateGroupMember' operation".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
DEBUG: CmdletProcessRecordAsyncStart:
DEBUG: CmdletGetPipeline:
DEBUG: CmdletBeforeAPICall:
DEBUG: URLCreated: /groups/ad5b9740-0925-4254-8393-e47072fc5696/members/$ref
DEBUG: RequestCreated: /v1.0/groups/ad5b9740-0925-4254-8393-e47072fc5696/members/$ref
DEBUG: HeaderParametersAdded:
DEBUG: BodyContentSet:
DEBUG: BeforeCall:
DEBUG: ResponseCreated:
DEBUG: BeforeResponseDispatch:
New-MgGroupMember_CreateExpanded: Invalid URL format specified in payload.
DEBUG: Finally:
DEBUG: CmdletAfterAPICall:
DEBUG: CmdletProcessRecordAsyncEnd:
DEBUG: CmdletProcessRecordEnd:
DEBUG: CmdletEndProcessing:
SDK Version
V2.26
Latest version known to work for scenario above?
V2.25
Known Workarounds
Use a Graph request
Debug output
See above
Configuration
Name Value
PSVersion 7.5.0
PSEdition Core
GitCommitId 7.5.0
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Other information
The issue has been validated by several others.