microsoft / microsoft/work-iq

[Bug] "Need admin approval" when consenting to write scopes (Mail.Send, Calendars.ReadWrite) in tenant

Open
#132 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1k
Forks
132
Avg merge
5d 19h
Merged PRs (30d)
6

Description

Environment

  • OS: Windows (win_x64)
  • WorkIQ version: workiq-preview v0.5.0
  • Tenant: Microsoft corporate tenant (user self-consent blocked by policy)
  • Account: @microsoft.com

Problem

Running workiq auth consent --scopes Mail.Send Mail.ReadWrite Calendars.ReadWrite triggers a "Need admin approval" dialog:

Work IQ CLI needs permission to access resources in your organization that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.

Entity write tools (create_entity_work_iq, do_action_work_iq) return HTTP 403 Forbidden when targeting paths like /me/sendMail or POST /me/messages.

Read operations work fine (fetch_work_iq on /me/messages, /me/events, /me/drive).

Expected Behavior (Question)

The workiq-preview README documents write capabilities (send mail, create events, etc.) and the troubleshooting guide says to run workiq auth consent --scopes <scope> for 403 errors. However, in the Microsoft corporate tenant, user self-consent is blocked by policy.

Is write support expected to work in enterprise tenants that require admin consent? If so, what's the recommended path to enable it — should these scopes be added to the tenant-wide admin consent, or is there another approach?

Reproduction

  1. Install workiq-preview: /plugin install workiq-preview@work-iq
  2. Try sending an email via do_action_work_iq/me/sendMail → 403 Forbidden
  3. Run npx -y @microsoft/workiq@preview auth consent --scopes Mail.Send → "Need admin approval" blocked

References

  • Related: #82, #85
  • Troubleshooting doc mentions workiq auth consent as the fix, but it requires admin approval in enterprise tenants

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the workiq auth consent command and the troubleshooting guidance referenced in the README, then compare the Mail.Send, Mail.ReadWrite, and Calendars.ReadWrite reproduction steps with related issues #82 and #85. Determine whether the documented write flow covers tenants requiring admin consent and document the supported enablement path or the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api, authentication, authorization, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.