Skip to content

Conversation

Copy link

Copilot AI commented Nov 18, 2025

The flow creates an error record for every group where transitive member fetch fails. In environments with 100+ groups lacking proper Graph API permissions, this generates 100+ error emails per run.

Changes

  • Added deduplication: Introduced TransitiveErrorLogged boolean variable to track if error has been logged in current run
  • Wrapped error creation: Error logging now conditional on TransitiveErrorLogged == false, set to true after first log
  • Fixed typo: "presnce" → "presence" in error message

Flow Logic

Initialize TransitiveErrorLogged = false
  └─ Apply_to_each_group
      └─ Get_Transitive_members (fails)
          └─ Check_if_error_already_logged
              └─ If false:
                  ├─ Log error once
                  └─ Set TransitiveErrorLogged = true
              └─ Continue with flat group members fallback

Impact

  • Reduces error notifications from N per failing group to 1 per run
  • Preserves error visibility for investigation (includes flow run URL)
  • No change to group processing or data accuracy
  • No configuration changes required

File: CLEANUP-AdminSyncTemplatev3OrphanedUsers-B9E28619-A6E0-EE11-904C-0022480B7872.json (+78/-28 lines)

Original prompt

This section details on the original issue you should resolve

<issue_title>[CoE Starter Kit - BUG] ISSUE TITLE</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

Flow produced error: "Cannot fetch transitive information about groups so group size and presnce of guest users will not be correct. Please investigate"

Expected Behavior

Flow should run without error. See #10262. I have installed the latest releases each month for the last few months.

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?

CLEANUP - Admin | Sync Template v3 (Orphaned Users)

What method are you using to get inventory and telemetry?

Cloud flows

Steps To Reproduce

  1. Flow runs weekly.
  2. Email with 100's of errors arrives every Wednesday morning.

Anything else?

No response</issue_description>

<agent_instructions>Analyze the issue and troubleshoot with clear solution</agent_instructions>

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


✨ 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 flow error in Admin Sync Template v3 Fix: Deduplicate error logging in orphaned users sync flow Nov 18, 2025
Copilot AI requested a review from AmarSaiRam November 18, 2025 04:46
Copilot finished work on behalf of AmarSaiRam November 18, 2025 04:46
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] ISSUE TITLE

2 participants