How to assign a category to an Intune Application using the powershell script

Thilak Baskaran 20 Reputation points
2025-01-16T19:12:22.57+00:00

I am trying to update an intune published application using the powershell using the below command

$category = @{"@odata.type"= "#microsoft.graph.mobileAppCategory"

ID = "0000000-0000-000-0000-000000000000"

DisplayName = "Test App"}

$category = $category | ConvertTo-Json

Update-MgbetaDeviceAppManagementMobileApp -MobileAppId $mobileAppId -BodyParameter $category

Error Message

Update-MgBetaDeviceAppManagementMobileApp : Exception has been thrown by the target of an invocation.

Status: 400 (BadRequest)

ErrorCode: ModelValidationFailure

Date: 2025-01-16T18:51:12

Headers:

Transfer-Encoding : chunked

Vary : Accept-Encoding

Strict-Transport-Security : max-age=31536000

request-id : Removed

client-request-id : Removed

x-ms-ags-diagnostic : Removed

Date : Thu, 16 Jan 2025 18:51:12 GMT

At line:1 char:1

  • Update-MgBetaDeviceAppManagementMobileApp -MobileappID "0000000000000 ...
  • 
        + CategoryInfo          : InvalidOperation: ({ MobileAppId =...raphMobileApp }:<>f__AnonymousType153`3) [Update-MgBetaDe..._UpdateExpanded], Exception
    
        + FullyQualifiedErrorId : ModelValidationFailure,Microsoft.Graph.Beta.PowerShell.Cmdlets.UpdateMgBetaDeviceAppManagementMobileApp_UpdateExpanded
    
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,961 questions
Microsoft Intune Updates
Microsoft Intune Updates
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Updates: Broadly released fixes addressing specific issue(s) or related bug(s). Updates may also include new or modified features (i.e. changing default behavior).
114 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,515 questions
0 comments No comments
{count} votes

Accepted answer
  1. ZhoumingDuan-MSFT 15,355 Reputation points Microsoft Vendor
    2025-01-17T01:34:14.0666667+00:00

    @Thilak Baskaran, Thanks for posting in Q&A.

    From your description, I know you want to assign a category to an Intune Application using the PowerShell script.

    Based on my research, here is a link with useful information you can refer to.

    https://memv.ennbee.uk/posts/creating-assigning-app-categories/

    Non-official, just for reference.

    Hope it can help you.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.