microsoftgraph / microsoftgraph/msgraph-sdk-powershell

Get-MgDeviceManagementManagedDevicel does not return proper value for EthernetMacAddress

Open
#2,832 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Investigation
Dominant language
C#
Stars
898
Forks
230
Avg merge
2d 5h
Merged PRs (30d)
31

Description

Describe the bug

I am building a export of Intune devices , using PowerShell:
$devices = Get-MgDeviceManagementManagedDevice -All

Expected behavior

I expect a range of values for each property returned by Get-MgDeviceManagementManagedDevice , including the property EthernetMacAddress, while almost every device has a value in "Ethernet MAC" when I view inspect a device in Intune admin center.

How to reproduce
  1. execute $devices = Get-MgDeviceManagementManagedDevice -All
  2. inspect the variable $devices | Out-GridView
  3. Observe that the column EthernetMacAddress is empty
SDK Version

2.19.0

Latest version known to work for scenario above?

not available

Known Workarounds

No work arounds are known to me

Debug output
Click to expand log ```

$devices = Get-MgDeviceManagementManagedDevice -debug -top 20
DEBUG: [CmdletBeginProcessing]: - Get-MgDeviceManagementManagedDevice begin processing with parameterSet 'List'.
DEBUG: [Authentication]: - AuthType: 'AppOnly', TokenCredentialType: 'ClientCertificate', ContextScope: 'Process', AppName: 'Techbeheer Device management App'.
DEBUG: [Authentication]: - Scopes: [Device.ReadWrite.All, Group.ReadWrite.All, DeviceManagementServiceConfig.ReadWrite.All, DeviceManagementManagedDevices.ReadWrite.All, GroupMember.ReadWrite.All].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?$top=20

Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26100; nl-NL),PowerShell/7.4.3
Accept-Encoding : gzip
SdkVersion : graph-powershell/2.19.0
client-request-id : 9c67ecf9-820f-46fd-a605-291431b7a141

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : cc53967b-cd96-4a2f-a37c-52f8c0a65843
client-request-id : 9c67ecf9-820f-46fd-a605-291431b7a141
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"008","RoleInstance":"AM2PEPF0001BD29"}}
odata-version : 4.0
Date : Mon, 08 Jul 2024 08:15:05 GMT

Body:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#deviceManagement/managedDevices",
"@odata.count": 20,
"@odata.nextLink": "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?$top=20&$skiptoken=LastDeviceName%3d%27DESKTOP-I40MRGL%27%2cLastDeviceId%3d%2768c9d53c-5ea8-4a37-bb42-00f364387f22%27",
"value": [
{
"id": "68c9d53c-5ea8-4a37-bb42-00f364387f22",
"userId": "79a37bfa-5530-4665-a6b0-9a08464a44e3",
"deviceName": "DESKTOP-ABCDEFG",
"managedDeviceOwnerType": "personal",
"enrolledDateTime": "2022-03-30T17:10:30Z",
"lastSyncDateTime": "2023-06-21T15:40:09Z",
"operatingSystem": "Windows",
"complianceState": "noncompliant",
"jailBroken": "Unknown",
"managementAgent": "mdm",
"osVersion": "10.0.22000.1936",
"easActivated": true,
"easDeviceId": "E1CB75C45E6A2A318036113765B2FB3A",
"easActivationDateTime": "0001-01-01T00:00:00Z",
"azureADRegistered": true,
"deviceEnrollmentType": "windowsAutoEnrollment",
"activationLockBypassCode": null,
"emailAddress": "xxxxxx@xx.nl",
"azureADDeviceId": "a0a7d1e5-3199-4086-90e8-5193ec8fb0d4",
"deviceRegistrationState": "registered",
"deviceCategoryDisplayName": "Unknown",
"isSupervised": false,
"exchangeLastSuccessfulSyncDateTime": "0001-01-01T00:00:00Z",
"exchangeAccessState": "none",
"exchangeAccessStateReason": "none",
"remoteAssistanceSessionUrl": null,
"remoteAssistanceSessionErrorDetails": null,
"isEncrypted": false,
"userPrincipalName": "79a37bfa55304665a6b09a08464a44exxxxx@jpthijsse.nl",
"model": "TravelMate Spin B118-G2-R",
"manufacturer": "Acer",
"imei": "",
"complianceGracePeriodExpirationDateTime": "2023-07-22T16:25:27Z",
"serialNumber": "",
"phoneNumber": "",
"androidSecurityPatchLevel": "",
"userDisplayName": "xxxxxxxxl",
"configurationManagerClientEnabledFeatures": null,
"wiFiMacAddress": "84FDD193166F",
"deviceHealthAttestationState": null,
"subscriberCarrier": "",
"meid": "",
"totalStorageSpaceInBytes": 127270912000,
"freeStorageSpaceInBytes": 62043193344,
"managedDeviceName": "xxxxxx_Windows_3/30/2022_5:10 PM",
"partnerReportedThreatState": "unknown",
"requireUserEnrollmentApproval": null,
"managementCertificateExpirationDate": "2024-02-15T11:47:10Z",
"iccid": null,
"udid": null,
"notes": null,
"ethernetMacAddress": null,
"physicalMemoryInBytes": 0,
"enrollmentProfileName": null,
"deviceActionResults": []
}
]
}

DEBUG: [CmdletEndProcessing]: - Get-MgDeviceManagementManagedDevice end processing.

</details>


### Configuration

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

Nothing specific to this configuration

Other information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Get-MgDeviceManagementManagedDevice -All and compare its EthernetMacAddress output with the v1.0 /deviceManagement/managedDevices response shown in the issue. Determine whether the missing value is caused by the SDK or the Graph API; done means the cause is confirmed and the issue has a tested fix or a documented service limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.