MSFT Teams: update onlineMeetings setup documentation - #1423
MSFT Teams: update onlineMeetings setup documentation#1423aperez-worklytics wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
🟡 Changes recommended
An unresolved critical shared-app indexing issue and two moderate output and regression-test issues remain.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds copy-pasteable Microsoft Teams PowerShell setup commands, extracts generated instructions into a Terraform template, and corrects the connector metadata field wiring.
Changes:
- Adds exact application access policy commands to the Teams README.
- Adds reusable Teams setup instructions with client ID substitution.
- Corrects
external_token_todointegration.
File summaries
| File | Summary | Review findings |
|---|---|---|
infra/modules/worklytics-connector-specs/msft-365.tf |
Wires Teams instructions into generated connector todos. | critical (1 vote): Shared-app plans can fail with an invalid module.msft_365_grants index. moderate (1 vote): Add regression coverage for both cmdlets and the client ID marker. moderate (1 vote): Non-file TODO outputs omit the external instructions. |
infra/modules/worklytics-connector-specs/docs/msft-teams/instructions.tftpl |
Stores generated Teams setup instructions. | No findings. |
docs/sources/microsoft-365/msft-teams/README.md |
Documents the exact PowerShell commands. | No findings. |
Review details
Suppressed comments (2)
infra/modules/worklytics-connector-specs/msft-365.tf:171
- This is the regression-sensitive part of the fix, but the existing Terraform tests do not exercise the Microsoft 365 connector output or the generated Teams instructions. Please add a test that checks
available_msft_365_connectors["msft-teams"].external_token_todocontains both cmdlets and the%%entraid.client_id%%marker; otherwise the originalexternal_todotypo could recur whileterraform validateand the current tests still pass.
external_token_todo : templatefile("${path.module}/docs/msft-teams/instructions.tftpl", {})
infra/modules/worklytics-connector-specs/msft-365.tf:171
- When
todos_as_local_files = false, this new external instructions value is never included in a returned TODO:worklytics-connectors-msft-365.outputs.todosexposes onlymodule.msft_365_grants[*].todo, while the only concatenation ofexternal_token_todois the local-file resource gated by that flag. Terraform Cloud/output-based configurations therefore still silently lose the PowerShell setup instructions. Include the external text in the non-file TODO output too, with the same client-ID substitution.
external_token_todo : templatefile("${path.module}/docs/msft-teams/instructions.tftpl", {})
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ] | ||
| environment_variables : local.msft_365_environment_variables | ||
| external_todo : null | ||
| external_token_todo : null |
There was a problem hiding this comment.
Fixing this, that was broken
| 4. Follow steps on [Configure application access to online meetings or virtual events](https://learn.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy): | ||
| - Add a policy for the application created for the connector, providing its `application id` (client ID) | ||
| ```shell | ||
| New-CsApplicationAccessPolicy -Identity Teams-Policy-For-Worklytics -AppIds "%%entraid.client_id%%" -Description "Policy for MSFT Teams used for Worklytics Psoxy connector" |
There was a problem hiding this comment.
Adding here the commands needed to run.
…odo file When msft_connector_app_object_id is set, provision_entraid_apps is false and module.msft_365_grants has no per-connector instances, so local_file.todo-with-external-todo must read filename/todo from module.msft_365_grant_to_shared instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The MSFT todos output path still omits the rendered external Teams instructions.
Review details
Suppressed comments (1)
infra/modules/worklytics-connector-specs/msft-365.tf:171
- This makes the Teams instructions non-null, but they are only consumed by
local_file.todo-with-external-todo. Whentodos_as_local_filesis false (the Terraform Cloud/todos_as_outputsflow),worklytics-connectors-msft-365/outputs.tfstill returns onlyvalues(module.msft_365_grants)[*].todo, so it never includes this PowerShell section (and is empty for shared-app deployments). Include the rendered external instructions, with the client-ID substitution, in the MSFTtodosoutput as well.
external_token_todo : templatefile("${path.module}/docs/msft-teams/instructions.tftpl", {})
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
…ust the local file Previously the msft-teams PowerShell instructions were only appended when writing local_file.todo-with-external-todo, so the todos_as_outputs flow (todos_as_local_files = false) never surfaced them, and they were silently dropped for shared-app deployments too. Factor the enriched per-connector todo text into local.msft_365_todos and reuse it for both the todos output and the local_file content so they stay in sync. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Good catch, not a false positive — fixed in 00a4eba: factored the enriched per-connector todo text (base grant todo + external_token_todo with client-ID substitution) into a single |
There was a problem hiding this comment.
🔵 Needs a closer look
Two moderate issues remain in shared-app TODO file management and next-step calculation.
Review details
Suppressed comments (2)
infra/modules/worklytics-connectors-msft-365/main.tf:154
- In shared-app mode with
todos_as_local_files = true,module.msft_365_grant_to_shared[0]already creates and manages this filename through itslocal_file.todoresource. This secondlocal_filewrites enriched content to the same path, so the module resource sees drift on every subsequent plan and Terraform continually tries to restore/rewrite the base TODO. Avoid having twolocal_fileresources manage one filename; move the enrichment into the original resource or disable its file creation when the enriched file is used.
filename = local.provision_entraid_apps ? module.msft_365_grants[each.key].filename : module.msft_365_grant_to_shared[0].filename
content = local.msft_365_todos[each.key]
infra/modules/worklytics-connectors-msft-365/outputs.tf:8
- With
msft_connector_app_object_idset andmsft-teamsenabled, this output now contains the shared grant/Teams TODO, butnext_todo_stepstill derives only frommodule.msft_365_grants(which is empty in this mode; outputs.tf:13). It therefore remainsvar.todo_stepinstead of advancing, and the AWS/GCP root modules use that value for subsequent TODOs, reusing step 1. Include the shared grant'snext_todo_stepfor the shared-app path.
value = values(local.msft_365_todos)
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
Fixes
external_todovsexternal_token_todo) ininfra/modules/worklytics-connector-specs/msft-365.tfthat silently dropped the PowerShell setup instructions from the generatedTODO - setup msft-teams.mdfile duringterraform applyFeatures
New-CsApplicationAccessPolicy/Grant-CsApplicationAccessPolicyPowerShell commands (not just a link to Microsoft's docs) in themsft-teamsconnector README, so customers can copy-paste them directlyinfra/modules/worklytics-connector-specs/docs/msft-teams/instructions.tftpl, following the same pattern already used forclaude/cursor/etc., for easier maintenanceLogistics
Change implications
TODO - setup msft-teams.mdwill now include the PowerShell section (previously silently dropped due to the field-name bug) - output content differs, but this is a bug fix, not a breaking changealpha, but this is a bug fix restoring intended behavior, not a breaking changeTest plan
terraform validatepasses ininfra/modules/worklytics-connector-specsandinfra/modules/worklytics-connectors-msft-365terraform consolethattemplatefile(...)on the new.tftplrenders byte-identical content to the old heredoc (including the%%entraid.client_id%%marker, still substituted downstream inworklytics-connectors-msft-365/main.tf)terraform applyin a real msft-365 deployment to confirm the generatedTODO - setup msft-teams.mdnow includes the PowerShell section with the real client ID substituted in