Service Graph Connector for Microsoft Intune - Retrieving Mac Addresses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 09:46 AM - edited 11-21-2023 07:58 AM
Hi, this is not a question but an answer to a problem that I experienced when working in the "Service Graph Connector for Microsoft Intune" plugin. I don’t have the ability to post articles but in the event anyone else ran into this issue, I wanted to provide a solution.
I’m not sure if anyone else has run into this, but the out-of-box “computer” action for this plugin which pulls in the list of attributes for Intune Computers does not work for pulling in Mac Addresses.
When loading in test records for the import, I observed that the ethernetMacAddress attribute was not being populated for records.
In the Intune Admin Center in our environment, however, the field is populated for Computer records.
Without going down too much of the rabbit hole, I discovered that the issue was indeed with the API itself. Here are the PowerShell steps I took to determine this. (The Graph Explorer API was also useful: https://developer.microsoft.com/en-us/graph/graph-explorer)
1) In Powershell, I ran the following command:
Install-Module -Name Microsoft.Graph.Intune
2) To connect to our Intune Instance I used the below command. Which of course prompts for credentials. It is best if you have an account with admin/read access to Intune devices and properties, of course.
Connect-MSGraph
3) To get the attributes of a device I used the following command:
Get-IntuneManagedDevice -filter "deviceName eq '{deviceName}'" | GET-MSGraphAllPages
As you can see, no value is returned for ethernetMacAddress.
Eventually, I read through the Microsoft Graph API documentation at https://learn.microsoft.com/en-us/graph/api/resources/intune-devices-manageddevice?view=graph-rest-1... and noticed the following:
I believe this explains why the ethernetMacAddress attribute/field values for each record is not populated during the Intune import. It appears to be an inherent limitation of the API, one which the ServiceNow plugin does not account for (please correct me if I am mistaken).
Here is the solution I implemented. There may be a more optimal way to perform this, but this has worked for us:
1) Created a custom action with the Intune connectionalias and Intune Device ID as inputs. Initially, we were not populating the Intune Device ID on computer records, but decided to do so as part of the import as a read only field so we can pass it back to Intune to retrieve Mac Addresses for devices.
2) Created a REST step that selects the ethernetMacAddress value of a single Intune Device passed.
Get command: https://graph.microsoft.com/beta/deviceManagement/manageddevices('$DeviceID')?`$select=ethernetMacAddress
3) I have a Flow that executes after the Intune Import is completed that then checks for devices updated by Intune and updates their Mac Addresses accordingly using the above custom action. I will not show the Script step but it adds colons in the Mac Address as we need it to be a specific syntax. The GET request only returns it as a string of alphabetic and numeric values. But the same goes for the managedDevice entity for the wiFiMacAddress attribute.
If I have provided incorrect information, please correct me if I am wrong. I do not see anything in the Intune plugin that addresses the above limitation, however. I may be missing something as I have not seen anyone else post about this. It would surprise me if I am the first. In the event that others have run into this and simply not posted, however, I hope this saves you some time. And if it is an issue that everyone experiences, perhaps this can be addressed in an update by whoever maintains the "Service Graph Connector for Microsoft Intune" plugin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 12:38 PM
You can hit the "thumbs up" icon on Steve's post.
Good question. I haven't had the opportunity to look into the release notes but this plugin has had quite a few updates since this post was originally made. It may or may not have been resolved in a later release, we haven't updated our plugin yet because we haven't had time to assess the changes and outside of the MAC Address it works pretty well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 11:29 AM
Any news on that case? were they able to more forward with enhancement ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 10:29 AM
Did you install IntegrationHub ETL? I recently had a similar requirement, and after overcoming its limitations, was able to get something similar setup without - well - all of what you did.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 01:05 PM
We do have IntegrationHub ETL installed. We are using the Intune Service Graph Connector and it does not retrieve the ethernetMacAddress from the Microsoft Graph API. I used this script to get the address from Microsoft using a REST call and insert it into the payload for IRE. Then IntegrationHub ETL was used to map that data into the CMDB tables. I did have to add a Network Adapter lookup to the mapping in ETL.
I would like to hear how you did it with IntegrationHub ETL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 01:11 PM
I guess our issue wasn't specific to MAC (it was IP Address instead), but this is what I received from SN Support and it appears to be working:
Solution Proposed:
Thank you for your patience, it seems that the Intune imports are running correctly and you should be able to now map the Cleansed IP Addresses to the mapping to the SG-Intune Computers ETL Transform.
Please make sure you have selected the 'Service Graph Connector for Microsoft Intune' Application.
*Go to ETL
*Select SG-Intune Computers
*Select "Select CMDB Classes to Map Source Data" (step 3)
*Select "Edit Mapping" under the "Computer 1" class
*Select "Add Attribute"
*Select the "IP Address " attribute and save
*Drag and drop the 'cleansed_ipaddress from the right Data column to the left column under the newly created attribute. This will automatically save the transform.
*Go back 2 screens to the ETL Transform Map Assist and let a full import run, after the run completes you should see the IP Addresses mapped to the IP Address field.