Skip to content

Update-MgDeviceAppManagementMobileApp dropping "/" from application Name #3185

@ngaither-tdh

Description

@ngaither-tdh

Describe the bug

I am leveraging some automation to rename Intune apps when they are retired. This allows us to find apps that are no longer in service. These apps live in the tenant for 30 days before they are then removed by the same automation. With the latest release of Microsoft Graph PowerShell Module (2.26.0), the Update-MgDeviceAppManagementMobileApp cmdlet has changed in behavior. This cmdlet now drops the "/" from the displayName parameter when updating application Display Names.

Expected behavior

I usually expect the code below to rename the app to [RETIRED_M/d/yyyy] but it is now renaming the application to [RETIRED_Mdyyyy] and dropping the "/" from the name. Downgrading to 2.25.0 resolves this issue.

How to reproduce

  1. Execute the code below in 2.26.0 and the error is reproduced.
  2. Execute the code below in 2.25.0 and the expected behavior occurs.
$newappdisplayname = '[RETIRED_'+(Get-Date -Format M/d/yyyy)+']'+" $($applicationToRetire.DisplayName)"
        
Write-Host "Retiring $($applicationToRetire.DisplayName) v.$($applicationToRetire.version)"
    
$params = @{
    "@odata.type" = "#microsoft.graph.win32LobApp"
    "displayName" = $newappdisplayname
} | ConvertTo-Json

Update-MgDeviceAppManagementMobileApp -MobileAppId $applicationToRetire.Id -BodyParameter $params

SDK Version

Microsoft.Graph 2.26.0

Latest version known to work for scenario above?

2.25.0

Known Workarounds

Downgrade to 2.25.0

Debug output

Click to expand log ```
</details>


### Configuration

Name                           Value
----                           -----
PSVersion                      7.4.7
PSEdition                      Core
GitCommitId                    7.4.7
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

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions