Summary
scripts/Enable-WorkIQToolsForTenant.ps1 does not provision the Work IQ application (fdcc1f02-fc51-4226-8753-f668596af7f7), which is the app that actually triggers AADSTS650052 during CLI/MCP authentication. As a result the script does not resolve the error its own .SYNOPSIS claims to resolve.
Worse, scripts/Verify-WorkIQTenant.ps1 checks the same incomplete list and therefore reports "All checks passed. Work IQ is fully provisioned in this tenant." for a tenant that cannot authenticate. The false pass actively misdirects the operator away from the real cause.
Repro steps
- On a tenant that has never had the Work IQ service principal created, run:
pwsh -NoProfile -File scripts/Enable-WorkIQToolsForTenant.ps1
pwsh -NoProfile -File scripts/Verify-WorkIQTenant.ps1
- Both complete successfully.
Verify prints All checks passed. Work IQ is fully provisioned in this tenant.
- Attempt to authenticate the Work IQ MCP server / CLI.
Actual behavior
Authentication fails:
Authorization Failed
AADSTS650052: The app is trying to access a service
'fdcc1f02-fc51-4226-8753-f668596af7f7' (Work IQ) that your organization
'<tenant-id>' lacks a service principal for. Contact your IT Admin to review
the configuration of your service subscriptions or consent to the application
in order to create the required service principal.
Expected behavior
Either:
Enable-WorkIQToolsForTenant.ps1 provisions fdcc1f02-fc51-4226-8753-f668596af7f7 along with the others, or
- the scripts explicitly document that this app is a separate prerequisite and
Verify-WorkIQTenant.ps1 fails (or at minimum warns) when it is absent.
Today it does neither, and reports success instead.
Root cause
The app named in the error is not referenced anywhere in the repository. A repo-wide search for fdcc1f02 returns zero matches.
Enable-WorkIQToolsForTenant.ps1 (lines 37–51) defines the full set of app IDs it will create:
| App |
App ID |
Provisioned by script? |
| Work IQ (named in the error) |
fdcc1f02-fc51-4226-8753-f668596af7f7 |
no |
| Work IQ Tools |
ea9ffc3e-8a23-4a7d-836d-234d7c7565c1 |
yes |
| Work IQ CLI |
ba081686-5d24-4bc6-a0d6-d034ecffed87 |
yes |
9 × mcp_* servers (Mail, Me, Calendar, Teams, OneDrive, SharePoint, Admin, Word, M365Copilot) |
various |
yes |
Note that Work IQ Tools (ea9ffc3e-…) and Work IQ (fdcc1f02-…) are different applications. Having the former does not satisfy the token request for the latter.
Verify-WorkIQTenant.ps1 (lines 37–49) hardcodes the same list, so it is structurally incapable of detecting this condition.
Documented prerequisite
Enable your tenant for Work IQ (Microsoft Learn) documents fdcc1f02-fc51-4226-8753-f668596af7f7 as a separate one-time Global Administrator step:
az ad sp create --id fdcc1f02-fc51-4226-8753-f668596af7f7
or POST https://graph.microsoft.com/v1.0/servicePrincipals with body {"appId": "fdcc1f02-fc51-4226-8753-f668596af7f7"}.
Nothing in this repository's README, ADMIN-INSTRUCTIONS.md, or scripts points the operator at that page, so an admin who follows the repo instructions end-to-end lands on a tenant that reports healthy but does not work.
Suggested fix
- Add
fdcc1f02-fc51-4226-8753-f668596af7f7 to the provisioning list in Enable-WorkIQToolsForTenant.ps1.
- Add it to the checked list in
Verify-WorkIQTenant.ps1 so the verifier can fail on this condition.
- Cross-reference the Microsoft Learn enablement page from
ADMIN-INSTRUCTIONS.md, including the billing prerequisites it lists (usage-based billing plan in Copilot Studio with an assigned Azure subscription/resource group), which are also not mentioned in this repo.
Related
Summary
scripts/Enable-WorkIQToolsForTenant.ps1does not provision theWork IQapplication (fdcc1f02-fc51-4226-8753-f668596af7f7), which is the app that actually triggersAADSTS650052during CLI/MCP authentication. As a result the script does not resolve the error its own.SYNOPSISclaims to resolve.Worse,
scripts/Verify-WorkIQTenant.ps1checks the same incomplete list and therefore reports "All checks passed. Work IQ is fully provisioned in this tenant." for a tenant that cannot authenticate. The false pass actively misdirects the operator away from the real cause.Repro steps
pwsh -NoProfile -File scripts/Enable-WorkIQToolsForTenant.ps1pwsh -NoProfile -File scripts/Verify-WorkIQTenant.ps1VerifyprintsAll checks passed. Work IQ is fully provisioned in this tenant.Actual behavior
Authentication fails:
Expected behavior
Either:
Enable-WorkIQToolsForTenant.ps1provisionsfdcc1f02-fc51-4226-8753-f668596af7f7along with the others, orVerify-WorkIQTenant.ps1fails (or at minimum warns) when it is absent.Today it does neither, and reports success instead.
Root cause
The app named in the error is not referenced anywhere in the repository. A repo-wide search for
fdcc1f02returns zero matches.Enable-WorkIQToolsForTenant.ps1(lines 37–51) defines the full set of app IDs it will create:fdcc1f02-fc51-4226-8753-f668596af7f7ea9ffc3e-8a23-4a7d-836d-234d7c7565c1ba081686-5d24-4bc6-a0d6-d034ecffed87mcp_*servers (Mail, Me, Calendar, Teams, OneDrive, SharePoint, Admin, Word, M365Copilot)Note that
Work IQ Tools(ea9ffc3e-…) andWork IQ(fdcc1f02-…) are different applications. Having the former does not satisfy the token request for the latter.Verify-WorkIQTenant.ps1(lines 37–49) hardcodes the same list, so it is structurally incapable of detecting this condition.Documented prerequisite
Enable your tenant for Work IQ (Microsoft Learn) documents
fdcc1f02-fc51-4226-8753-f668596af7f7as a separate one-time Global Administrator step:or
POST https://graph.microsoft.com/v1.0/servicePrincipalswith body{"appId": "fdcc1f02-fc51-4226-8753-f668596af7f7"}.Nothing in this repository's README,
ADMIN-INSTRUCTIONS.md, or scripts points the operator at that page, so an admin who follows the repo instructions end-to-end lands on a tenant that reports healthy but does not work.Suggested fix
fdcc1f02-fc51-4226-8753-f668596af7f7to the provisioning list inEnable-WorkIQToolsForTenant.ps1.Verify-WorkIQTenant.ps1so the verifier can fail on this condition.ADMIN-INSTRUCTIONS.md, including the billing prerequisites it lists (usage-based billing plan in Copilot Studio with an assigned Azure subscription/resource group), which are also not mentioned in this repo.Related
AADSTS65002, a different failure mode.