Get-MgDevice accepted parameter DeviceId is not relevant
Get-MgDevice -DeviceId <String> is quite confusing. As parameter accept Object Id instead of Device Id. When I query a device, Object Id output is Id.
I feel this is a design related issue. Accepted parameter requires a change. Command should be like Get-MgDevice -Id <String>
@Ndiritu The ID parameter name as composed from the entity name and "id" is confusing in this case as the device entity does also contain "deviceId" parameter and the API does allow getting it by this parameter, too. See https://learn.microsoft.com/en-us/graph/api/device-get?view=graph-rest-1.0&tabs=powershell#http-request
We're currently hiding the second request as there is no option to get the device by a real "deviceid" parameter as opposed to by ID.
CC @andrueastman