msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Get-MgApplication's -ApplicationId parameter should be called -ObjectId

Open alexandair opened this issue 1 year ago • 4 comments

Attached images explain the problem. The following image compares the Get-MgApplication to the correct implementation in Get-AzAdApplication: id_or_appid The second image gives a short analysis of the problem: final

alexandair avatar Jan 06 '24 21:01 alexandair

This is a super misleading parameter name. It seems to be the same case with Update-MgApplication's parameter "ApplicationId", in module v. 2.18.0 Microsoft.Graph.Applications.

Please fix this and change the -ApplicationId parameter name to "-Id" or "-ObjectId".

n-pedersen avatar Apr 29 '24 10:04 n-pedersen

Agree this should be changed. The Azure portal shows "Application ID" and "Object ID". The cmdlet parameter -ApplicationId actually expects an "Object ID", not "Application ID".

jlobsienwooga avatar May 29 '24 10:05 jlobsienwooga

@Ndiritu We need to keep it backward-compatible to prevent a breaking change here, OK?

petrhollayms avatar Jun 04 '24 12:06 petrhollayms

@petrhollayms

It's easy to fix wrongly named parameters and maintain backward compatibility.

Rename the -ApplicationId parameter to -ObjectId and create a parameter alias -ApplicationId.

alexandair avatar Jun 04 '24 18:06 alexandair