Has anyone managed to update the Entra name for an Android for work device

Darren Duvall (Anticimex Global) 20 Reputation points
2025-02-14T03:03:39.6966667+00:00

I can rename a fully managed android but not an android for work

$Device = Get-MgDeviceManagementManagedDevice -ManagedDeviceId "12345-1245-4118-a41d-0dac089b3101"|select *

Set-MgBetaDeviceManagementManagedDeviceName -ManagedDeviceId $Device.Id -DeviceName "AP-AND-FM-RQCX50539ZY"

$Device = Get-MgDeviceManagementManagedDevice -ManagedDeviceId "1234512345-1234-1234-a897-583c6e3755ca"|select *

Set-MgBetaDeviceManagementManagedDeviceName -ManagedDeviceId $Device.Id -DeviceName "Bob.Builder_AndroidForWork"

The first one gets renamed the 2nd drops an error [BadRequest] : { "_version": 3, "Message": "An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: c28bff3a-c66f-4559-89e8-c3b27f6b60dd - Url: https://fef.msub03.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices('2cd20f5a-fa77-4c09-a897-583c6e3755ca')/microsoft.management.services.api.setDeviceName?api-version=5024-07-19", "CustomApiErrorPhrase": "", "RetryAfter": null, "ErrorSourceService": "", "HttpHeaders":

It's running in in a automation account via a managed identity any hints welcomed. The only real difference is one is a fully managed intune enterprise device and the other has just a work profile.

Tried with a delegated account but saw that this may not be supported

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,113 questions
Microsoft Intune Android
Microsoft Intune Android
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Android: An open-source mobile platform based on the Linux kernel, developed by Google, and maintained by the Open Handset Alliance.
342 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,569 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xenia-MSFT 4,600 Reputation points Microsoft Vendor
    2025-02-17T02:32:49.72+00:00

    @Darren Duvall (Anticimex Global) Thanks for your quick update.

    Currently, with Q&A limitation, I couldn't repeat this situation. And I didn't get any report about this issue from others. Given this situation, it is suggested to create an online support ticket to get more help. Here is the support link:

    https://learn.microsoft.com/en-us/mem/get-support

    Thanks for your understanding and hope everything goes well with 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 additional answer

Sort by: Most helpful
  1. Xenia-MSFT 4,600 Reputation points Microsoft Vendor
    2025-02-14T05:40:54.77+00:00

    @Darren Duvall (Anticimex Global) Thanks for posting in our Q&A.

    Based on my research, we can rename device via "setDeviceName".

    https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-setdevicename?view=graph-rest-beta

    Request URL: (Need to add the specific deviceID)

    Post https://graph.microsoft.com/beta/deviceManagement/managedDevices('deviceID')/setDeviceName
    

    Body:

    {"deviceName":"xxx"}
    

    However, in intune official article, it shows that we can rename the following types of android devices:

    • Android Enterprise:
      • Corporate-owned work profiles
      • Dedicated devices
      • Fully managed

    Hope it will help.


    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.


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.