1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/enterprise_util.h"
7 #include "base/win/win_util.h"
8 #include "base/win/windows_version.h"
12 bool IsManagedDevice() {
13 // Legacy domain join does not actually guarantee that the device is managed,
14 // however there is no API that can be used to determine if any group policies
15 // are actually being applied. As such, for these devices we need to assume
17 // In addition, simply being joined to AAD does not mean the device is being
18 // managed by the AAD tenant, so checking for AAD join is not included here.
19 return base::win::IsEnrolledToDomain() ||
20 base::win::IsDeviceRegisteredWithManagement();
23 bool IsEnterpriseDevice() {
24 // Both legacy domain join and AAD join represent machine-wide enterprise
26 return base::win::IsEnrolledToDomain() || base::win::IsJoinedToAzureAD();