Add metrics to determine the impact of AzureAD over-reporting [chromium/src : main]

0 views
Skip to first unread message

gwsq (Gerrit)

unread,
Jul 7, 2026, 10:05:50 AM (yesterday) Jul 7
to Dmytro Yeroshkin, Enterprise Policy Reviews, Owen Min, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
Attention needed from Owen Min and Will Harris

Message from gwsq

Reviewer source(s):
zm...@chromium.org is from context(chrome/enterprise/gwsq/enterprise-policy-review.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Owen Min
  • Will Harris
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib9f32469af02f815abce91dbe81df1675c7e83d5
Gerrit-Change-Number: 8032646
Gerrit-PatchSet: 8
Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Reviewer: Owen Min <zm...@chromium.org>
Gerrit-Reviewer: Will Harris <w...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Owen Min <zm...@chromium.org>
Gerrit-Attention: Will Harris <w...@chromium.org>
Gerrit-Comment-Date: Tue, 07 Jul 2026 14:05:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Owen Min (Gerrit)

unread,
Jul 7, 2026, 1:19:01 PM (yesterday) Jul 7
to Dmytro Yeroshkin, Enterprise Policy Reviews, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
Attention needed from Dmytro Yeroshkin and Will Harris

Owen Min voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Dmytro Yeroshkin
  • Will Harris
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib9f32469af02f815abce91dbe81df1675c7e83d5
    Gerrit-Change-Number: 8032646
    Gerrit-PatchSet: 8
    Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
    Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
    Gerrit-Reviewer: Owen Min <zm...@chromium.org>
    Gerrit-Reviewer: Will Harris <w...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dmytro Yeroshkin <yero...@chromium.org>
    Gerrit-Attention: Will Harris <w...@chromium.org>
    Gerrit-Comment-Date: Tue, 07 Jul 2026 17:18:52 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Will Harris (Gerrit)

    unread,
    Jul 7, 2026, 1:20:38 PM (yesterday) Jul 7
    to Dmytro Yeroshkin, Owen Min, Enterprise Policy Reviews, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
    Attention needed from Dmytro Yeroshkin

    Will Harris added 2 comments

    File base/win/win_util.h
    Line 226, Patchset 8 (Latest):BASE_EXPORT bool IsJoinedToAzureAD2();
    Will Harris . unresolved

    is the intent for all existing callers to migrate to this new API, and the old API to be deprecated?

    I'm curious about the naming - because it seems to imply it behaves identically to `IsJoinedToAzureAD` but it doesn't...? What is the overall plan for these APIs going forward?

    Line 54, Patchset 8 (Latest):enum class AzureADJoinType {
    Will Harris . unresolved

    not exposed to non-test callers, I don't think this needs to be here, it can be inside the `ScopedAzureADJoinStateForTesting` class below.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dmytro Yeroshkin
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib9f32469af02f815abce91dbe81df1675c7e83d5
      Gerrit-Change-Number: 8032646
      Gerrit-PatchSet: 8
      Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Owen Min <zm...@chromium.org>
      Gerrit-Reviewer: Will Harris <w...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Comment-Date: Tue, 07 Jul 2026 17:20:26 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dmytro Yeroshkin (Gerrit)

      unread,
      Jul 7, 2026, 2:59:28 PM (22 hours ago) Jul 7
      to Owen Min, Enterprise Policy Reviews, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
      Attention needed from Will Harris

      Dmytro Yeroshkin added 2 comments

      File base/win/win_util.h
      Line 226, Patchset 8:BASE_EXPORT bool IsJoinedToAzureAD2();
      Will Harris . unresolved

      is the intent for all existing callers to migrate to this new API, and the old API to be deprecated?

      I'm curious about the naming - because it seems to imply it behaves identically to `IsJoinedToAzureAD` but it doesn't...? What is the overall plan for these APIs going forward?

      Dmytro Yeroshkin

      Yes, the plan is to migrate all existing call sites to use the new method in a follow-up CL (timing TBD).

      Line 54, Patchset 8:enum class AzureADJoinType {
      Will Harris . resolved

      not exposed to non-test callers, I don't think this needs to be here, it can be inside the `ScopedAzureADJoinStateForTesting` class below.

      Dmytro Yeroshkin

      Required a bit of a refactor, but done.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Will Harris
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib9f32469af02f815abce91dbe81df1675c7e83d5
      Gerrit-Change-Number: 8032646
      Gerrit-PatchSet: 9
      Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Owen Min <zm...@chromium.org>
      Gerrit-Reviewer: Will Harris <w...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Will Harris <w...@chromium.org>
      Gerrit-Comment-Date: Tue, 07 Jul 2026 18:59:13 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Will Harris <w...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Will Harris (Gerrit)

      unread,
      Jul 7, 2026, 4:02:57 PM (21 hours ago) Jul 7
      to Dmytro Yeroshkin, Owen Min, Enterprise Policy Reviews, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
      Attention needed from Dmytro Yeroshkin

      Will Harris added 2 comments

      Patchset-level comments
      File-level comment, Patchset 9 (Latest):
      Will Harris . unresolved

      I don't really understand the purpose of this CL, if we just want to measure the metrics I don't think we need to add new public APIs. how will folks know which to call?

      I'm not sure how the staging of this works... or what the metrics will be used for.

      but I think I am happy to defer to owen here - I just worry we are adding a new public API here and how will people know whether or not to use it?

      Can we defer adding the public API until we decide what the way forward is?

      File components/policy/core/common/policy_loader_win.cc
      Line 175, Patchset 9 (Latest): bool is_enterprise_device2 =
      Will Harris . unresolved

      nit: `const`

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dmytro Yeroshkin
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib9f32469af02f815abce91dbe81df1675c7e83d5
      Gerrit-Change-Number: 8032646
      Gerrit-PatchSet: 9
      Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Owen Min <zm...@chromium.org>
      Gerrit-Reviewer: Will Harris <w...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Comment-Date: Tue, 07 Jul 2026 20:02:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dmytro Yeroshkin (Gerrit)

      unread,
      Jul 7, 2026, 4:40:21 PM (21 hours ago) Jul 7
      to Owen Min, Enterprise Policy Reviews, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
      Attention needed from Will Harris

      Dmytro Yeroshkin added 2 comments

      Patchset-level comments
      Will Harris . unresolved

      I don't really understand the purpose of this CL, if we just want to measure the metrics I don't think we need to add new public APIs. how will folks know which to call?

      I'm not sure how the staging of this works... or what the metrics will be used for.

      but I think I am happy to defer to owen here - I just worry we are adding a new public API here and how will people know whether or not to use it?

      Can we defer adding the public API until we decide what the way forward is?

      Dmytro Yeroshkin

      I'm not sure there is a clean way of adding these corrected metrics without making a function like this public in base/win_util.h. The results of this function need to be used in a different file+namespace. If you can suggest a clean way of doing this without a new public API, I'm definitely open to considering it.

      I renamed the function to better reflect what it does to hopefully avoid confusion.

      My understanding is that these metrics are of interest to the enterprise team to estimate the impact of removing the Azure AD over-reporting before we make the changes that will impact UMA and Omaha.

      File components/policy/core/common/policy_loader_win.cc
      Line 175, Patchset 9: bool is_enterprise_device2 =
      Will Harris . resolved

      nit: `const`

      Dmytro Yeroshkin

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Will Harris
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib9f32469af02f815abce91dbe81df1675c7e83d5
      Gerrit-Change-Number: 8032646
      Gerrit-PatchSet: 10
      Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Owen Min <zm...@chromium.org>
      Gerrit-Reviewer: Will Harris <w...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Will Harris <w...@chromium.org>
      Gerrit-Comment-Date: Tue, 07 Jul 2026 20:40:10 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Will Harris <w...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Will Harris (Gerrit)

      unread,
      Jul 7, 2026, 4:59:44 PM (20 hours ago) Jul 7
      to Dmytro Yeroshkin, Owen Min, Enterprise Policy Reviews, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
      Attention needed from Dmytro Yeroshkin and Owen Min

      Will Harris added 1 comment

      Patchset-level comments
      Will Harris . unresolved

      I don't really understand the purpose of this CL, if we just want to measure the metrics I don't think we need to add new public APIs. how will folks know which to call?

      I'm not sure how the staging of this works... or what the metrics will be used for.

      but I think I am happy to defer to owen here - I just worry we are adding a new public API here and how will people know whether or not to use it?

      Can we defer adding the public API until we decide what the way forward is?

      Dmytro Yeroshkin

      I'm not sure there is a clean way of adding these corrected metrics without making a function like this public in base/win_util.h. The results of this function need to be used in a different file+namespace. If you can suggest a clean way of doing this without a new public API, I'm definitely open to considering it.

      I renamed the function to better reflect what it does to hopefully avoid confusion.

      My understanding is that these metrics are of interest to the enterprise team to estimate the impact of removing the Azure AD over-reporting before we make the changes that will impact UMA and Omaha.

      Will Harris

      I'm sorry as a base/win owner I don't agree with adding a new api in base for just collecting the metrics

      I think if you need to collect the metrics this can be done internally to `components/policy/core/common/policy_loader_win.cc` maybe?

      I am still not sure what these metrics will be used for to be honest. Perhaps Owen can comment?

      I think once we have metrics we should then have one unified API that behaves correctly according to the behavior that we desire.

      in my mind we are simply fixing a bug here - it was never intended that `IsJoinedToAzureAD` should return true if the device is not joined to azure ad, so I would just fix the bug (you could add default-enabled killswitch if you think this will cause issues)

      If you want to be more cautious than this, collect the metrics internally in components/policy but changing the public API before we know what we are doing seems wrong.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dmytro Yeroshkin
      • Owen Min
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib9f32469af02f815abce91dbe81df1675c7e83d5
      Gerrit-Change-Number: 8032646
      Gerrit-PatchSet: 10
      Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Reviewer: Owen Min <zm...@chromium.org>
      Gerrit-Reviewer: Will Harris <w...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Owen Min <zm...@chromium.org>
      Gerrit-Attention: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Comment-Date: Tue, 07 Jul 2026 20:59:31 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Dmytro Yeroshkin <yero...@chromium.org>
      Comment-In-Reply-To: Will Harris <w...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dmytro Yeroshkin (Gerrit)

      unread,
      9:42 AM (4 hours ago) 9:42 AM
      to Owen Min, Enterprise Policy Reviews, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
      Attention needed from Owen Min and Will Harris

      Dmytro Yeroshkin added 1 comment

      Patchset-level comments
      Will Harris . unresolved

      I don't really understand the purpose of this CL, if we just want to measure the metrics I don't think we need to add new public APIs. how will folks know which to call?

      I'm not sure how the staging of this works... or what the metrics will be used for.

      but I think I am happy to defer to owen here - I just worry we are adding a new public API here and how will people know whether or not to use it?

      Can we defer adding the public API until we decide what the way forward is?

      Dmytro Yeroshkin

      I'm not sure there is a clean way of adding these corrected metrics without making a function like this public in base/win_util.h. The results of this function need to be used in a different file+namespace. If you can suggest a clean way of doing this without a new public API, I'm definitely open to considering it.

      I renamed the function to better reflect what it does to hopefully avoid confusion.

      My understanding is that these metrics are of interest to the enterprise team to estimate the impact of removing the Azure AD over-reporting before we make the changes that will impact UMA and Omaha.

      Will Harris

      I'm sorry as a base/win owner I don't agree with adding a new api in base for just collecting the metrics

      I think if you need to collect the metrics this can be done internally to `components/policy/core/common/policy_loader_win.cc` maybe?

      I am still not sure what these metrics will be used for to be honest. Perhaps Owen can comment?

      I think once we have metrics we should then have one unified API that behaves correctly according to the behavior that we desire.

      in my mind we are simply fixing a bug here - it was never intended that `IsJoinedToAzureAD` should return true if the device is not joined to azure ad, so I would just fix the bug (you could add default-enabled killswitch if you think this will cause issues)

      If you want to be more cautious than this, collect the metrics internally in components/policy but changing the public API before we know what we are doing seems wrong.

      Dmytro Yeroshkin

      Current proposal is to follow this with a CL that disables sensitive policy enforcement for devices with workspace joined state. And then switch other places that use the existing logic 2 milestones later.

      This means that in the short term, we need to be able to distinguish between the 3 possible Azure AD states: Not joined, device joined, workspace joined. The only place to obtain this data is the win32 API that we currently access from `GetAzureADJoinStateStorage` in win_util.cc by loading a dll. As far as I can tell, this means we need to either expose a new method, modify `IsJoinedToAzureAD` to return an enum, or load the dll in yet another file.

      Out of those 3 options the last one seems the most problematic to me. In the current version of the CL I went with option 1, but option 2 (or some variant thereof) is perfectly as acceptable to me.

      As for why we want to collect these metrics, one of the key items from my understanding is that same logic that controls these metrics, also impacts Omaha enterprise vs consumer metrics, so we want to gauge the impact before we shift Omaha DAU by a potentially significant margin. I will also ping Owen in chat to get him to weight in on this.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Owen Min
      • Will Harris
      Gerrit-Attention: Will Harris <w...@chromium.org>
      Gerrit-Comment-Date: Wed, 08 Jul 2026 13:42:29 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Owen Min (Gerrit)

      unread,
      11:31 AM (2 hours ago) 11:31 AM
      to Dmytro Yeroshkin, Enterprise Policy Reviews, Will Harris, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, grt+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, wfh+...@chromium.org
      Attention needed from Dmytro Yeroshkin and Will Harris

      Owen Min voted and added 1 comment

      Votes added by Owen Min

      Code-Review+1

      1 comment

      Patchset-level comments
      Will Harris . unresolved

      I don't really understand the purpose of this CL, if we just want to measure the metrics I don't think we need to add new public APIs. how will folks know which to call?

      I'm not sure how the staging of this works... or what the metrics will be used for.

      but I think I am happy to defer to owen here - I just worry we are adding a new public API here and how will people know whether or not to use it?

      Can we defer adding the public API until we decide what the way forward is?

      Dmytro Yeroshkin

      I'm not sure there is a clean way of adding these corrected metrics without making a function like this public in base/win_util.h. The results of this function need to be used in a different file+namespace. If you can suggest a clean way of doing this without a new public API, I'm definitely open to considering it.

      I renamed the function to better reflect what it does to hopefully avoid confusion.

      My understanding is that these metrics are of interest to the enterprise team to estimate the impact of removing the Azure AD over-reporting before we make the changes that will impact UMA and Omaha.

      Will Harris

      I'm sorry as a base/win owner I don't agree with adding a new api in base for just collecting the metrics

      I think if you need to collect the metrics this can be done internally to `components/policy/core/common/policy_loader_win.cc` maybe?

      I am still not sure what these metrics will be used for to be honest. Perhaps Owen can comment?

      I think once we have metrics we should then have one unified API that behaves correctly according to the behavior that we desire.

      in my mind we are simply fixing a bug here - it was never intended that `IsJoinedToAzureAD` should return true if the device is not joined to azure ad, so I would just fix the bug (you could add default-enabled killswitch if you think this will cause issues)

      If you want to be more cautious than this, collect the metrics internally in components/policy but changing the public API before we know what we are doing seems wrong.

      Dmytro Yeroshkin

      Current proposal is to follow this with a CL that disables sensitive policy enforcement for devices with workspace joined state. And then switch other places that use the existing logic 2 milestones later.

      This means that in the short term, we need to be able to distinguish between the 3 possible Azure AD states: Not joined, device joined, workspace joined. The only place to obtain this data is the win32 API that we currently access from `GetAzureADJoinStateStorage` in win_util.cc by loading a dll. As far as I can tell, this means we need to either expose a new method, modify `IsJoinedToAzureAD` to return an enum, or load the dll in yet another file.

      Out of those 3 options the last one seems the most problematic to me. In the current version of the CL I went with option 1, but option 2 (or some variant thereof) is perfectly as acceptable to me.

      As for why we want to collect these metrics, one of the key items from my understanding is that same logic that controls these metrics, also impacts Omaha enterprise vs consumer metrics, so we want to gauge the impact before we shift Omaha DAU by a potentially significant margin. I will also ping Owen in chat to get him to weight in on this.

      Owen Min

      ### Metrics

      We need metrics as there are many features depends on the device management state, in Chrome, Google Update and Remote desktop.

      See **Impact** section in https://docs.google.com/document/d/13kNPlcHqxSpb01KfCzlAK1Uw_3ru2lnfIX9I4yYeO-0/edit?resourcekey=0-3Cu1sQcUF4RNPuoT_WRGDg&tab=t.0#heading=h.e9cg4xchba6v for all affected area.

      So we need to be careful about the fix and the first step is using metrics to understand the scale of affected users.

      ### Two APIs

      Depends on the outcome of metrics, we may take different approach. If the number is big, we may have to have a slow migration. Sensitive policies check will be the first one but others may have to wait a bit so that enterprise can have time to prepare for the change. What happened in the past is enterprises users workflows depend on the bug we have and were very upset when we fixed them.

      It means we will need to support both old and new impl of `IsJoinedToAzureAD` for a few milestones.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dmytro Yeroshkin
      • Will Harris
      Gerrit-Attention: Dmytro Yeroshkin <yero...@chromium.org>
      Gerrit-Attention: Will Harris <w...@chromium.org>
      Gerrit-Comment-Date: Wed, 08 Jul 2026 15:30:48 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages