teams/README.md's Graph permission list is wrong and has been copied into published docs and a legal answer
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Read item 4 of core/switch_core/bridges/collaboration/teams/README.md, then confirm the enforced set in teams/identity.py (REQUIRED_GRAPH_ROLES) and the all-or-nothing check in teams/install.py (_granted_roles). Rewrite item 4 split into the distributed-app route (all eight roles, nothing optional) and the self-registered route, and add a comment pointing at REQUIRED_GRAPH_ROLES as the authority. Done when the list matches the code exactly and both routes read separately.
Written by the indexing model from the issue text.
Description
What's wrong
core/switch_core/bridges/collaboration/teams/README.md, under the administrator-owned environment setup, item 4:
Graph API permissions with admin consent, for channel capture + provisioning:
ChannelMessage.Read.Group(RSC, preferred) or tenant-wideChannelMessage.Read.All; plusChannel.Create,Channel.ReadBasic.All,User.ReadBasic.All, andTeamMember.ReadWrite.All/ChannelMember.ReadWrite.All.
Three problems:
TeamMember.ReadWrite.Allis not what Switch asks for.teams/identity.pydeclaresTeamMember.ReadWriteNonOwnerRole.All— a materially narrower permission that cannot change owner roles. This one matters most, because it is the line an administrator copies into Azure when granting consent.- Two permissions are missing:
Team.ReadBasic.AllandTeamsAppInstallation.ReadWriteSelfForTeam.All, both inREQUIRED_GRAPH_ROLES. - The required/optional framing does not hold for the distributed app.
REQUIRED_GRAPH_ROLESis checked as a whole ininstall.py(_granted_roles), and the install is refused unless the organisation's token carries every one of the eight — "Switch was not approved for the whole organisation: … Start again from Switch, and tick 'Consent on behalf of your organization'." So for that route there is no "RSC preferred" alternative and nothing is conditional.
The README is not simply stale: it is describing the self-registered Azure AD app route, where an administrator supplies app_id, a secret and tenant_id and no role check runs. On that route RSC genuinely is an option. But it reads as the permission list for Switch-and-Teams generally, and item 1 is wrong on both routes.
Why it is worth fixing here rather than only downstream
This text has been copied twice:
- into the published Microsoft Teams page (
microsoft-teams.mdx, "Before you begin"), which is being corrected now; - into an internal reference that fed an answer to a customer legal question, which had to be retracted.
Both copies reproduced the same three errors, because the README is the most discoverable description of what Teams needs. Correcting the copies leaves the source intact for the next person.
Suggested fix
Split item 4 by route, and name the enforced set for the distributed app:
- Distributed Switch Teams app — all eight of
REQUIRED_GRAPH_ROLES, no alternatives and nothing optional:ChannelMessage.Read.All,Channel.Create,Channel.ReadBasic.All,TeamMember.ReadWriteNonOwnerRole.All,ChannelMember.ReadWrite.All,User.ReadBasic.All,Team.ReadBasic.All,TeamsAppInstallation.ReadWriteSelfForTeam.All. Approval needs a Global Administrator or Privileged Role Administrator. - Self-registered app — the administrator's choice, described by consequence:
ChannelMessage.Read.Group(RSC) or tenant-wideChannelMessage.Read.Allfor capture, RSC not covering private or shared channels;Channel.Createfor provisioning;Channel.ReadBasic.All;User.ReadBasic.All;TeamMember.ReadWriteNonOwnerRole.AllandChannelMember.ReadWrite.Allfor adding people.
A comment pointing at REQUIRED_GRAPH_ROLES as the authority would stop the list drifting again.
Verified at switch-v0.32.1.
- Dominant language
- Python
- Stars
- 4.5k
- Forks
- 348
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 287
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sandbox-quantum/switch
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
sandbox-quantum/switch#2163 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
sandbox-quantum/switch#2162 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
sandbox-quantum/switch#2159 · 1 comment ·
Maintainers usually reply within 1 day
-
Get-Switch-Console link points at a path that only resolves via a redirectPossibly taken @Darshan3690 claimed this 3 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
sandbox-quantum/switch#1998 · 2 comments ·
Maintainers usually reply within 1 day
-
A session's age is not surfaced, so you cannot tell how old an agent's context isPossibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sandbox-quantum/switch#1993 ·
Maintainers usually reply within 1 day
All issues in sandbox-quantum/switch
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mohanraj00/entelos#200 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
sweep
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
bketelsen/truenas-mcp#77 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openedx/xblock-lti-consumer#765 ·
Maintainers usually reply within 1 day
-
bug pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pydantic/pydantic-ai#13939 ·
Maintainers usually reply within 1 day