Skip to content

Conversation

Copy link

Copilot AI commented Nov 18, 2025

HELPER - Maker Check unconditionally cleared admin_datemakermarkedorphan to null on every run, causing CLEANUP to reset it to today's date and losing the historical "since when" timestamp.

Changes

Find_Maker action (line 966): Include admin_datemakermarkedorphan in select

- "$select": "admin_makerid"
+ "$select": "admin_makerid, admin_datemakermarkedorphan"

Update_Maker action (line 640): Preserve date when maker remains orphaned, clear when un-orphaned

- "item/admin_datemakermarkedorphan": "@null"
+ "item/admin_datemakermarkedorphan": "@if(variables('isOrphan'), if(greater(length(outputs('Find_Maker')?['body/value']), 0), outputs('Find_Maker')?['body/value'][0]?['admin_datemakermarkedorphan'], null), null)"

Behavior

  • Orphaned maker (subsequent runs): Date preserved instead of reset
  • Maker becomes un-orphaned: Date cleared as before
  • New maker: Date null, CLEANUP sets if orphaned as before
Original prompt

This section details on the original issue you should resolve

<issue_title>[CoE Starter Kit - BUG] "Date Maker Marked Orphan" is reset with every run of "HELPER - Maker Check"</issue_title>
<issue_description>### Does this bug already exist in our backlog?

  • I have checked and confirm this is a new bug.

Describe the issue

We were wondering why many long-orphaned makers still had either no (null) or a very recent "Date Maker Marked Orphan" date.

We identified that the "HELPER - Make Check" flow updates the record of a Maker that is disabled. Depending on the EnvVar "Disabled Users are Orphaned", the maker is marked as either orphaned or not. But in any case, the "Date Maker Marked Oprhaned" is cleared (null).

Image

Sure, the "CLEANUP - Admin | Sync Template v3 (Orphaned Makers)" flow (who actually calls this "HELPER - Maker Check" flow) sets a new date (today) afterwards:

Image

But at that point we are losing information SINCE WHEN this maker has been identified as "orphaned".

Expected Behavior

The Makers table contains a "Date Maker Marked Oprhaned" field. This should represent the date SINCE WHEN the maker is orphaned.

It should not change as long as the user is still considered orphaned. Only when the user becomes un-orphaned (i.e. enabled again), the date should be removed. And only when the user becomes orphaned (again), a new date (today) should be set.

What I suggest here:
The "Update Maker" action in the "HELPER - Maker Check" flow should set the "Date Maker Marked Orphan" to null, IF the "isOrphaned" variable is false, else it should use the current value of the field. We could get that current value from the output of the "Find Maker" action.

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.50.6

What app or flow are you having the issue with?

HELPER - Maker Check

What method are you using to get inventory and telemetry?

Cloud flows

Steps To Reproduce

Set EnvVar "Disabled Users are Orphaned" to true.
Run "HELPER - Maker Check" flow with objectId of a selected user (to ensure that the user is in the Maker table).
Disable user account in Entra ID.
Run "HELPER - Maker Check" flow with objectId of a selected user (to ensure that user gets marked as orphaned).
Verify the "Date Maker Marked Orphaned" (will be null).

Anything else?

No response</issue_description>

<agent_instructions>Why Date Maker Marked Orphan" is reset with every run of "HELPER - Maker Check. Analyze the issue and troubleshoot with proper step with a solution.
</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Custom agent used: CoE Custom Agent
Specialized agent for triaging and fixing issues in the CoE Starter Kit. Always consult the official CoE docs and the team’s SharePoint notes first, then mine prior GitHub issues and the CoE Common Responses playbook.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix bug causing reset of maker orphan date Fix HELPER - Maker Check resetting Date Maker Marked Orphan on every run Nov 18, 2025
Copilot AI requested a review from AmarSaiRam November 18, 2025 06:57
Copilot finished work on behalf of AmarSaiRam November 18, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CoE Starter Kit - BUG] "Date Maker Marked Orphan" is reset with every run of "HELPER - Maker Check"

2 participants