With the latest changes in Android 12, there is no way on work profile to obtain any kind of device identifier. In this post specifies to use the Enrollment ID in work profile with Custom DPC:
if(VERSION.SDK_INT >= VERSION_CODES.S) {
// getEnrollmentSpecificId will return an empty string ("")
// when organization id is not set
devicePolicyManager.setOrganizationId(organizationId);
devicePolicyManager.getEnrollmentSpecificId();
} else {
// existing functionality to retrieve device identifier(s)
}
But without custom DPC in Android Management API we can´t call setOrganizationId as it requires Profile owner scope... Is any way to have the enterprise id, enrollment id, or some idenfifier on Android 12 in work profile mode?
Kind regards