Problem additional field physicalMemoryInBytes from Intune with Service Graph Connector

Loic Fournier
Kilo Contributor

Dear Community,

I trust that you are doing well,

We have done an integration Service Now > Intune with Service Graph Connector, everything is working fine but we need additionals properties / attributes like Jointype, and others and especially physicalMemoryInBytes. It's working for all of the others except for physicalMemoryInBytes with always a 0 value return 

We can see in Graph API list of properties as this is well one of it > https://docs.microsoft.com/en-us/graph/api/resources/intune-devices-windowsmanageddevice?view=graph-rest-beta

So i search on Internet and i find a topic > https://techcommunity.microsoft.com/t5/microsoft-intune/physicalmemoryinbytes-always-returns-0/m-p/3025721

Apparently physicalMemoryInBytes is in specific context hardwareinformation and we need maybe to specify it. I try in the flow designer to map it like below but this is not working 

outputs.targetObject.hardwareinformation,physicalMemoryInBytes = record.hardwareinformation,physicalMemoryInBytes;

Does someone has already experimented this problem ? how do you have solve it ? what is the correct way of defining an under context in the flow designer ? 

5 REPLIES 5

CMDB Whisperer
Mega Sage
Mega Sage

The feedback on the article specifies "select=hardwareinformation,physicalMemoryInBytes" as part of the request, but it seems like you are trying to add this on the transform layer rather than the outgoing API call.  I don't believe this is a valid syntax:

outputs.targetObject.hardwareinformation,physicalMemoryInBytes = record.hardwareinformation,physicalMemoryInBytes;

Where is this syntax specified?  You mention Flow Designer but SGC for Intune does not actually contain any flows.  Are you modifying the field mapping using IH-ETL? 


The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.

Hello @Paul Coste 

I trust that you are doing well, 

In fact i have installed ETL plugin that is necessary if you want to add custom fields in SGC for intune.

 

Actually the full configuration is below the ones underlined are the fields that i have added that are working.

So for the beginning i tried for physicalMemoryInBytes like that outputs.targetObject.physicalMemoryInBytes = record.physicalMemoryInBytes;

> but as this is not working i tried following:

outputs.targetObject.hardwareinformation,physicalMemoryInBytes = record.hardwareinformation,physicalMemoryInBytes;

Because i read this article : https://docs.microsoft.com/en-us/graph/api/resources/intune-devices-windowsmanageddevice?view=graph-rest-beta

But this is not working

outputs.targetObject.id = record.id;
outputs.targetObject.userId = record.userId;
outputs.targetObject.deviceName = record.deviceName;
outputs.targetObject.enrolledDateTime = record.enrolledDateTime;
outputs.targetObject.operatingSystem = record.operatingSystem;
outputs.targetObject.complianceState = record.complianceState;
outputs.targetObject.osVersion = record.osVersion;
outputs.targetObject.emailAddress = record.emailAddress;
outputs.targetObject.model=record.model;
outputs.targetObject.manufacturer=record.manufacturer;
outputs.targetObject.serialNumber = record.serialNumber;
outputs.targetObject.wiFiMacAddress = record.wiFiMacAddress;
outputs.targetObject.managedDeviceOwnerType = record.managedDeviceOwnerType;
outputs.targetObject.jailBroken = record.jailBroken;
outputs.targetObject.userDisplayName = record.userDisplayName;
outputs.targetObject.deviceEnrollmentType = record.deviceEnrollmentType;
outputs.targetObject.managementAgent = record.managementAgent;
outputs.targetObject.totalStorageSpaceInBytes = record.totalStorageSpaceInBytes;
outputs.targetObject.deviceType = record.deviceType;
outputs.targetObject.freeStorageSpaceInBytes = record.freeStorageSpaceInBytes;
outputs.targetObject.ethernetMacAddress = record.ethernetMacAddress;
outputs.targetObject.chassisType = record.chassisType;
outputs.targetObject.userPrincipalName = record.userPrincipalName;
outputs.targetObject.connectionAliasId = inputs.fd_data.action_inputs.connectionalias.sys_id;
outputs.targetObject.joinType = record.joinType;
outputs.targetObject.lastSyncDateTime = record.lastSyncDateTime;
 
 
Actually it seems to find something because when the field is not working you have an error on the flow designer testing and here we are getting value 0 which is the bug highlighted with Microsoft Graph API
 
"configurationManagerClientHealthState":null,"configurationManagerClientInformation":null,"ethernetMacAddress":null,"physicalMemoryInBytes":0,"processorArchitecture":"unknown"
 
I hope this is more clear

My point is that while comma may make sense syntactically in the context of the the MS API, it does not make sense in the context of the ServiceNow script, and because MS is asking you to query the system in a specific manner to get the data you are looking for, you need to accommodate that in the Data Source itself, which is part of the ETL application, NOT in the field mappings.  I do not believe that this is a valid syntax (record.hardwareinformation,physicalMemoryInBytes) due to the comma and I do not believe this is the right area to try and address the problem.  You need to look at the data source, which is scripted, and make the necessary modifications to the IntuneIntegrationUtil script.  As to what those modifications would be, I can't say without more investigation, but my hunch is that this is where you would need to modify the logic if the issue is in how the graph API is queried.  If you are trying to do this in the field map then you are too late because the API has already been called and the data has already been retrieved. 


The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.

Ok i will search but from what i understand the only way to add custom fields was the Flow Designer + ETL but i will search base on this thank you