Skip to content

Real Enager script updates - #489

Merged
DeanCron merged 2 commits into
microsoft:masterfrom
DeanCron:deancron-microsoft-super-telegram
Jul 22, 2026
Merged

Real Enager script updates#489
DeanCron merged 2 commits into
microsoft:masterfrom
DeanCron:deancron-microsoft-super-telegram

Conversation

@DeanCron

Copy link
Copy Markdown
Collaborator

Audited all Viva Engage/Yammer scripts in scripts/ for outdated/deprecated API usage and migrated what's migratable to Microsoft Graph.

Migrated to Microsoft Graph (app-only, client-credentials auth)
Delete-YammerGroups → Delete-EngageGroups — DELETE /beta/employeeExperience/communities/{id}
Add-YammerGroupAdmins → Add-EngageGroupAdmins — POST /groups/{id}/owners/$ref
Get-YammerGroupInfo → Get-EngageGroupInfo — communities list + group member count + group owners (dropped LastMessageAt, no Graph equivalent)
⚠️ Breaking change: legacy numeric Yammer group IDs don't map to Graph community/group IDs — existing input CSVs need regenerating (see each README).

Renamed only (endpoints unchanged, still current/documented)
Export-YammerNetworkData → Export-EngageNetworkData — removed -IncludeExternalNetworks (not supported for native-mode networks); added runtime warning for -IncludeFiles All
Export-YammerFiles → Export-EngageFiles — added native-mode limitation warning
Both reference the confirmed March 13, 2026 admin center retirement (MC1230453).

Rewritten (scope change)
Delete-YammerUsers → Delete-EngageUsers — previously deleted the user's Yammer account entirely via the legacy API; no Graph equivalent exists for that. Rewritten to remove a user from a specific M365 group/community (DELETE /groups/{id}/members/{id}/$ref). CSV format changed from UserID to GroupID + Email.
No migration possible
Delete-AllCommunityPosts — Graph's communities API has no endpoint for reading/deleting message content. Left on the legacy Yammer REST API; documented as a permanent dependency until Microsoft ships one.
All scripts validated via PowerShell AST parsing. Delete-EngageGroups and Add-EngageGroupAdmins were also live-tested end-to-end against a test tenant.

Dean Cron and others added 2 commits July 22, 2026 10:14
- Delete-YammerGroups -> Delete-EngageGroups: migrated to Graph
  DELETE /beta/employeeExperience/communities/{id}
- Add-YammerGroupAdmins -> Add-EngageGroupAdmins: migrated to Graph
  POST /groups/{id}/owners/$ref
- Get-YammerGroupInfo -> Get-EngageGroupInfo: migrated to Graph
  (communities list + group member count + group owners). Dropped
  LastMessageAt column, which has no Graph equivalent.
- Export-YammerNetworkData -> Export-EngageNetworkData,
  Export-YammerFiles -> Export-EngageFiles: renamed only (endpoints
  remain the current, Microsoft-documented Yammer export APIs).
  Removed the -IncludeExternalNetworks parameter/option, and added
  runtime warnings/README notes about native-mode export limitations
  and the March 13, 2026 admin center retirement (MC1230453).
- Updated all associated READMEs with new Graph permissions, auth
  model, and breaking-change notes for the legacy numeric Yammer
  group ID vs. Graph community/group ID formats.
- Live-tested Delete-EngageGroups and Add-EngageGroupAdmins against
  a disposable test tenant app registration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ation

- Delete-YammerUsers -> Delete-EngageUsers: rewritten from a full Yammer
  account deletion (legacy REST API DELETE /users/{id}.json) to a Graph-based
  removal of users from a specific M365 group/community
  (DELETE /groups/{id}/members/{id}/$ref). This is a scope change, not a
  like-for-like swap - there's no Graph API to delete a Yammer user account
  outright, so the script and README now make clear it only removes access
  to the group(s) listed in the CSV, not the account itself. CSV format
  changed from a single UserID column to GroupID + Email per row.
- Delete-AllCommunityPosts: no code changes - confirmed there is no Graph
  equivalent for reading/deleting community message content (the Graph
  employeeExperience/communities API only covers CRUD and membership).
  Documented this permanent legacy-API dependency in the script header and
  README so it's clear no further migration is possible today.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@DeanCron
DeanCron merged commit 82a6ca2 into microsoft:master Jul 22, 2026
2 of 3 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🛰️ PR Sweeper report

Risk: 🟠 MEDIUM · Security gate: ✅ passing · Files: 22

🔒 Automated guardrails (authoritative)

Category Location Finding
⚠️ secret scripts/Add-EngageGroupAdmins/Add-EngageGroupAdmins.ps1:58 Possible Hardcoded secret assignment detected in added content. (evidence: [redacted])
⚠️ secret scripts/Add-EngageGroupAdmins/README.md:42 Possible Hardcoded secret assignment detected in added content. (evidence: [redacted])
⚠️ secret scripts/Delete-EngageGroups/Delete-EngageGroups.ps1:50 Possible Hardcoded secret assignment detected in added content. (evidence: [redacted])
⚠️ secret scripts/Delete-EngageUsers/Delete-EngageUsers.ps1:69 Possible Hardcoded secret assignment detected in added content. (evidence: [redacted])
⚠️ secret scripts/Delete-EngageUsers/README.md:48 Possible Hardcoded secret assignment detected in added content. (evidence: [redacted])
⚠️ secret scripts/Get-EngageGroupInfo/Get-EngageGroupInfo.ps1:51 Possible Hardcoded secret assignment detected in added content. (evidence: [redacted])
⚠️ secret scripts/Get-EngageGroupInfo/README.md:25 Possible Hardcoded secret assignment detected in added content. (evidence: [redacted])

🤖 Dual-model AI review (advisory)

AI review unavailable for this run (models not reachable or no diff). Guardrails above are unaffected.

  • GPT-class reviewer (openai/gpt-5): skipped — GitHub Models HTTP 413: {"error":{"code":"tokens_limit_reached","message":"Request body too large for gpt-5 model. Max size: 4000 tokens.","details":"Request body too large for gpt-5 model. Max size: 4000 tokens."}}
  • Deep-reasoning reviewer (openai/o3): skipped — GitHub Models HTTP 413: {"error":{"code":"tokens_limit_reached","message":"Request body too large for o3 model. Max size: 4000 tokens.","details":"Request body too large for o3 model. Max size: 4000 tokens."}}

The automated guardrails are authoritative and gate the security status. The AI review is advisory and never auto-merges. Thanks for contributing to FastTrack! 🛩️

@github-actions github-actions Bot added sweeper:risk-medium PR Sweeper: medium risk sweeper:security-review PR Sweeper: needs security review labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweeper:risk-medium PR Sweeper: medium risk sweeper:security-review PR Sweeper: needs security review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant