Skip to content

The function name is incorrect: Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResult #133

Closed

Description

@AshleyYangSZ

Issue found by this https://twitter.com/alexandair/status/1504088670718017537?t=Ze2i48cMhOHxyn202NCjjA&s=19
And the link to the doc: https://docs.microsoft.com/en-us/powershell/module/microsoft.graph.devicemanagement.functions/get-mgdevicemanagementdevicecustomattributeshellscriptuserrunstatedevicerunstatemanageddevicecloudpcremoteactionresult?view=graph-powershell-beta

Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResult

This should be Get-MgDeviceManagementManagedDeviceCloudPcRemoteActionResult

Activity

  1. changed the title [-]The function name is incorrect: Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateGet-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResultDeviceRunStateManagedDeviceCloudPcRemoteActionResult[/-] [+]The function name is incorrect: Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResult[/+] on Mar 20, 2022
  2. peombwa commented on Apr 1, 2022

    @peombwa
    Member

    Thanks for bringing this to our attention.

    Unfortunately, Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResult is defined as a valid API path in the CSDL metadata, our single source of truth. Get-MgDeviceManagementManagedDeviceCloudPcRemoteActionResult already exists and is mapped to the right API, i.e.,

    • Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResult -> /deviceManagement/deviceCustomAttributeShellScripts/{deviceCustomAttributeShellScript-id}/userRunStates/{deviceManagementScriptUserState-id}/deviceRunStates/{deviceManagementScriptDeviceState-id}/managedDevice/getCloudPcRemoteActionResults.
    • Get-MgDeviceManagementManagedDeviceCloudPcRemoteActionResult -> /deviceManagement/managedDevices/{managedDevice-id}/getCloudPcRemoteActionResults.

    Current metadata definition

    • .../deviceCustomAttributeShellScripts/{id}/userRunStates/{id}/deviceRunStates
      image
    • .../deviceCustomAttributeShellScripts/{id}/userRunStates/{id}/deviceRunStates/managedDevice
      image
      • .../deviceCustomAttributeShellScripts/{id}/userRunStates/{id}/deviceRunStates/managedDevice/getCloudPcRemoteActionResults
        image

    The workload owner should provide a fix by removing the ContainsTarget="true" from deviceRunStates navigation properties on deviceManagementScriptUserState entity. Alternatively, we can apply an XSLT transform to remove the ContainsTarget="true" as a temporary fix.

  3. added
    metadata-issue
    on Apr 1, 2022
  4. AshleyYangSZ commented on May 18, 2022

    @AshleyYangSZ
    Author

    Hi Peter Ombwa (@peombwa) Thanks for you explanation, since I'm not the owner of the two metadata, could we move forward with the second option? _Alternatively, we can apply an XSLT transform to remove the ContainsTarget="true" as a temporary fix firstly?
    image

  5. peombwa commented on May 18, 2022

    @peombwa
    Member

    AshleyYangSZ. Awesome! I'll remove them.

  6. peombwa commented on May 18, 2022

    @peombwa
    Member

    We should also remove the following unsupported paths/commands:
    image
    image

    Only the commands highlighted in yellow are supported.

    Related to microsoftgraph/msgraph-sdk-powershell#1221 (comment).

  7. peombwa commented on Jun 21, 2022

    @peombwa
    Member

    The workload has already fixed the issue in the metadata:

    ➜ Find-MgGraphCommand -Command .*-Mg.*RemoteActionResult
    
    Command                                                        Module                     URI
    -------                                                        ------                     ---
    Get-MgDeviceManagementComanagedDeviceCloudPcRemoteActionResult DeviceManagement.Functions /deviceManagement/comanagedDevices/{managedDevice-id}/getCloudPcRemoteActionResults
    Get-MgDeviceManagementManagedDeviceCloudPcRemoteActionResult   DeviceManagement.Functions /deviceManagement/managedDevices/{managedDevice-id}/getCloudPcRemoteActionResults
    Get-MgUserManagedDeviceCloudPcRemoteActionResult               Users.Functions            /users/{user-id}/managedDevices/{managedDevice-id}/getCloudPcRemoteActionResults
    
    ➜ Find-MgGraphCommand -Command .*-MgBulkReprovision.*
    
    Command                                                        Module                   URI
    -------                                                        ------                   ---
    Invoke-MgBulkReprovisionDeviceManagementComanagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/comanagedDevices/bulkReprovisionCloudPc
    Invoke-MgBulkReprovisionDeviceManagementManagedDeviceCloudPc   DeviceManagement.Actions /deviceManagement/managedDevices/bulkReprovisionCloudPc
    Invoke-MgBulkReprovisionUserManagedDeviceCloudPc               Users.Actions            /users/{user-id}/managedDevices/bulkReprovisionCloudPc
    
    ➜ Find-MgGraphCommand -Command .*-MgBulkRestore.*
    
    Command                                                    Module                   URI
    -------                                                    ------                   ---
    Invoke-MgBulkRestoreDeviceManagementComanagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/comanagedDevices/bulkRestoreCloudPc
    Invoke-MgBulkRestoreDeviceManagementManagedDeviceCloudPc   DeviceManagement.Actions /deviceManagement/managedDevices/bulkRestoreCloudPc
    Invoke-MgBulkRestoreUserManagedDeviceCloudPc               Users.Actions            /users/{user-id}/managedDevices/bulkRestoreCloudPc
    
    ➜ Find-MgGraphCommand -Command .*-MgReprovision.*
    
    Command                                                    Module                   URI
    -------                                                    ------                   ---
    Invoke-MgReprovisionDeviceManagementComanagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/comanagedDevices/{managedDevice-id}/reprovisionCloudPc
    Invoke-MgReprovisionDeviceManagementManagedDeviceCloudPc   DeviceManagement.Actions /deviceManagement/managedDevices/{managedDevice-id}/reprovisionCloudPc
    Invoke-MgReprovisionUserManagedDeviceCloudPc               Users.Actions            /users/{user-id}/managedDevices/{managedDevice-id}/reprovisionCloudPc

    The refreshed commands will be available as part of microsoftgraph/msgraph-sdk-powershell#1330.

  8. added
    Resolved: Awaiting Deployment
    on Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Resolved: Awaiting Deploymentmetadata-issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions