Jul 15 2021 05:43 AM - edited Jul 15 2021 05:48 AM
I'm using the following API to fetch the managed device properties and it has a field named emailAddress but it is empty
API : https://docs.microsoft.com/en-us/graph/api/intune-devices-manageddevice-get?view=graph-rest-1.0
Response :
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#deviceManagement/managedDevices",
"@odata.count": 1,
"value": [
{
"id": "90b67389-2856-43ed-8142-cxxxxxxxxxx",
"userId": "e99a55d5-fe5d-4142-ad8f-xxxxxxxxxxx",
"deviceName": "arun.xxxxx_AndroidForWork_7/1/2021_2:34 PM",
"managedDeviceOwnerType": "company",
"enrolledDateTime": "2021-07-01T14:34:07Z",
"lastSyncDateTime": "2021-07-15T07:43:20Z",
"operatingSystem": "Android",
"complianceState": "compliant",
"jailBroken": "false",
"managementAgent": "mdm",
"osVersion": "8.1.0",
"easActivated": true,
"easDeviceId": "afw21FB64B73D7Exxxxxxxxxxxxxx",
"easActivationDateTime": "0001-01-01T00:00:00Z",
"azureADRegistered": true,
"deviceEnrollmentType": "deviceEnrollmentManager",
"activationLockBypassCode": null,
"emailAddress": "",
"azureADDeviceId": "xxxxxxxx-16fe-4a9e-8bcd-xxxxxxxx",
"deviceRegistrationState": "registered",
"deviceCategoryDisplayName": "Unknown",
"isSupervised": false,
"exchangeLastSuccessfulSyncDateTime": "0001-01-01T00:00:00Z",
"exchangeAccessState": "none",
"exchangeAccessStateReason": "none",
"remoteAssistanceSessionUrl": null,
"remoteAssistanceSessionErrorDetails": null,
"isEncrypted": true,
"userPrincipalName": "arun.joseph@xxxxxx.onmicrosoft.com",
"model": "Nexus 6P",
"manufacturer": "Huawei",
"imei": "xxxxxxxxxx",
"complianceGracePeriodExpirationDateTime": "2021-07-15T03:41:27Z",
"serialNumber": "xxxxxxxxxxx",
"phoneNumber": "",
"androidSecurityPatchLevel": "2018-12-05",
"userDisplayName": "Arun Joseph",
"configurationManagerClientEnabledFeatures": null,
"wiFiMacAddress": "xxxxxxxxxxx",
"deviceHealthAttestationState": null,
"subscriberCarrier": "",
"meid": "xxxxxxxxx",
"totalStorageSpaceInBytes": 0,
"freeStorageSpaceInBytes": 0,
"managedDeviceName": "arun.joseph_AndroidForWork_7/1/2021_2:34 PM",
"partnerReportedThreatState": "unknown",
"iccid": null,
"udid": null,
"notes": null,
"ethernetMacAddress": null,
"physicalMemoryInBytes": 0,
"deviceActionResults": []
},
]
}
Note:
1. I have redacted some values with xxxx for obvious reasons
2. I have enrolled this device using company portal android app
As u can see, the emailAddress field is empty but userPrincipalName field is giving the user's mail id.
but I'm not sure if userPrincipalName will always have the email of the mapped user.
My questions:
1. Will userPrincipalName field always have mapped user's email?
2. When will the emailAddress field be empty and when will it have value?
Kind regards,
Arun Joseph
Jul 22 2021 04:48 AM
SolutionJul 22 2021 08:53 AM
Jul 22 2021 04:48 AM
Solution