@salesforce/afv-skills 1.40.0 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/package.json +1 -1
  2. package/skills/automation-flow-generate/SKILL.md +32 -43
  3. package/skills/experience-portal-create/SKILL.md +497 -0
  4. package/skills/experience-portal-create/assets/report-template.md +30 -0
  5. package/skills/experience-portal-create/references/mcp-invocation.md +288 -0
  6. package/skills/experience-portal-create/references/post-creation-activate-publish.md +165 -0
  7. package/skills/experience-portal-create/references/templates.md +253 -0
  8. package/skills/experience-ui-bundle-features-generate/SKILL.md +5 -1
  9. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -0
  10. package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -0
  11. package/skills/platform-datamask-run/SKILL.md +345 -0
  12. package/skills/platform-datamask-run/references/api-surface.md +130 -0
  13. package/skills/platform-datamask-run/references/policy-authoring.md +185 -0
  14. package/skills/platform-datamask-run/references/run-and-abort.md +116 -0
  15. package/skills/platform-datamask-run/scripts/poll-job.sh +115 -0
  16. package/skills/platform-dataspace-access-configure/SKILL.md +51 -3
  17. package/skills/platform-dataspace-access-configure/scripts/inspect-dataspace-scopes.sh +56 -0
  18. package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +1 -0
  19. package/skills/platform-sandbox-configure/SKILL.md +17 -2
  20. package/skills/platform-trial-org-create/SKILL.md +175 -0
  21. package/skills/platform-trial-org-create/examples/create_request.json +9 -0
  22. package/skills/platform-trial-org-create/examples/error_response.json +41 -0
  23. package/skills/platform-trial-org-create/examples/success_response.json +27 -0
  24. package/skills/platform-trial-org-create/references/error_codes.md +42 -0
  25. package/skills/platform-trial-org-create/references/signup_request_fields.md +69 -0
  26. package/skills/platform-trial-org-create/scripts/create_signup_request.sh +175 -0
  27. package/skills/platform-trial-org-create/scripts/get_signup_request.sh +155 -0
  28. package/skills/platform-widget-generate/SKILL.md +47 -6
  29. package/skills/platform-widget-generate/examples/conditional.json +3 -3
  30. package/skills/platform-widget-generate/examples/list-with-foreach.json +2 -2
  31. package/skills/platform-widget-generate/examples/single-object.json +2 -2
  32. package/skills/platform-widget-generate/references/widget-bundle-layout.md +1 -1
  33. package/skills/service-agentforce-channel-configure/SKILL.md +271 -0
  34. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +97 -0
  35. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +145 -0
  36. package/skills/service-agentforce-channel-configure/references/channel-branch-voice.md +69 -0
  37. package/skills/service-agentforce-channel-configure/references/channel-types.md +61 -0
  38. package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +86 -0
  39. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +135 -0
  40. package/skills/service-agentforce-channel-configure/references/routing-flow.md +384 -0
  41. package/skills/service-catalog-template-deploy/SKILL.md +310 -0
  42. package/skills/service-catalog-template-deploy/references/cli-invocation.md +258 -0
  43. package/skills/service-catalog-template-deploy/scripts/activate-verify.mjs +164 -0
  44. package/skills/service-catalog-template-deploy/scripts/build-deploy-payload.mjs +94 -0
  45. package/skills/service-catalog-template-deploy/scripts/resolve-template.mjs +331 -0
  46. package/skills/service-catalog-template-search/SKILL.md +212 -0
  47. package/skills/service-catalog-template-search/references/cli-invocation.md +128 -0
  48. package/skills/service-catalog-template-search/scripts/classify-catalog.mjs +205 -0
  49. package/skills/service-concierge-portal-generate/SKILL.md +126 -0
  50. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1428 -0
  51. package/skills/service-digital-engagement-channel-configure/SKILL.md +46 -6
  52. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -1
  53. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +4 -1
  54. package/skills/service-helpagent-coordinate/README.md +8 -2
  55. package/skills/service-helpagent-coordinate/SKILL.md +126 -130
  56. package/skills/service-helpagent-coordinate/assets/help-agent-spec.md +70 -53
  57. package/skills/service-helpagent-coordinate/references/agent-script.md +571 -457
  58. package/skills/service-helpagent-coordinate/references/channel-voice.md +38 -9
  59. package/skills/service-helpagent-coordinate/references/channel-web-chat.md +173 -49
  60. package/skills/service-helpagent-coordinate/references/output-report-format.md +126 -0
  61. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +153 -0
  62. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +79 -0
  63. package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +35 -0
  64. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +271 -0
  65. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/references/cli-invocation.md +265 -0
  66. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-enable-plan.mjs +220 -0
  67. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-final-report.mjs +102 -0
  68. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/record-enable-result.mjs +73 -0
  69. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +206 -0
  70. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/references/cli-invocation.md +194 -0
  71. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/scripts/classify-readiness.mjs +223 -0
  72. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +45 -7
  73. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +45 -5
  74. package/skills/service-itsm-agentic-setup-configure/SKILL.md +116 -0
  75. package/skills/service-itsm-agentic-setup-configure/examples/output-templates.md +64 -0
  76. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +158 -0
  77. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/cli-invocation.md +361 -0
  78. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/error-taxonomy.md +44 -0
  79. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/reactivation.md +66 -0
  80. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +66 -0
  81. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/specialized-templates.md +148 -0
  82. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +169 -0
  83. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/build-create-body.mjs +116 -0
  84. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-agent-existence.mjs +185 -0
  85. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-preflight.mjs +168 -0
  86. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/create-scratch-dir.mjs +58 -0
  87. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +197 -0
  88. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +186 -0
  89. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/action-availability.md +51 -0
  90. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/cli-invocation.md +345 -0
  91. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/error-taxonomy.md +44 -0
  92. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/reactivation.md +63 -0
  93. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +44 -0
  94. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +149 -0
  95. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/build-create-body.mjs +110 -0
  96. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-action-availability.mjs +201 -0
  97. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-activate-result.mjs +135 -0
  98. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-agent-existence.mjs +194 -0
  99. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-preflight.mjs +158 -0
  100. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/create-scratch-dir.mjs +58 -0
  101. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +191 -0
  102. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +133 -0
  103. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +71 -0
  104. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +308 -0
  105. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +23 -0
  106. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +193 -0
  107. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +57 -0
  108. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +394 -0
  109. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +266 -0
  110. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/cli-invocation.md +106 -0
  111. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/helper-contracts.md +142 -0
  112. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/permset-topology.md +82 -0
  113. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-action-surface.mjs +137 -0
  114. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-assignment-state.mjs +99 -0
  115. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-permset-availability.mjs +120 -0
  116. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/resolve-target-user.mjs +86 -0
  117. package/skills/service-itsm-agentic-setup-uel-user-create/SKILL.md +284 -0
  118. package/skills/service-itsm-agentic-setup-uel-user-create/references/mcp-invocation.md +302 -0
  119. package/skills/service-itsm-channels-coordinate/SKILL.md +472 -0
  120. package/skills/service-itsm-incident-mgmt-configure/SKILL.md +212 -0
  121. package/skills/service-itsm-incident-mgmt-configure/references/mcp-invocation.md +225 -0
  122. package/skills/service-itsm-incident-priority-configure/SKILL.md +53 -12
  123. package/skills/service-itsm-swarming-configure/SKILL.md +212 -0
  124. package/skills/service-itsm-teams-configure/SKILL.md +395 -0
  125. package/skills/service-itsm-teams-configure/references/azure-credential-population.md +213 -0
  126. package/skills/service-itsm-teams-configure/references/gotchas.md +23 -0
  127. package/skills/service-itsm-teams-coordinate/SKILL.md +175 -0
  128. package/skills/service-itsm-teams-coordinate/examples/output-templates.md +85 -0
  129. package/skills/service-itsm-teams-debug/SKILL.md +144 -0
  130. package/skills/service-itsm-teams-debug/references/configuration-checklists.md +277 -0
  131. package/skills/service-itsm-teams-debug/references/report-generation.md +95 -0
  132. package/skills/service-itsm-teams-employee-agent-configure/SKILL.md +139 -0
  133. package/skills/service-itsm-teams-employee-agent-configure/assets/Teams_AgentForce.EmbeddedServiceConfig-meta.xml +43 -0
  134. package/skills/service-itsm-teams-employee-agent-configure/references/teams-embedded-employee-agent.md +480 -0
  135. package/skills/service-itsm-teams-itdesk-configure/SKILL.md +232 -0
  136. package/skills/service-itsm-teams-itservice-configure/SKILL.md +391 -0
@@ -0,0 +1,232 @@
1
+ ---
2
+ name: service-itsm-teams-itdesk-configure
3
+ description: "Configure the \"Set Up Salesforce IT Desk\" checklist for Microsoft Teams Employee Service (ITSM) — the fulfiller/agent side, covering app enablement, marketplace install guidance, user access assignment, and Swarming collaboration-tool setup. Use this for: 'turn on Salesforce IT Desk', 'set up IT Desk on Teams', 'assign Teams for IT Desk permission set', 'set Teams as collaboration tool for swarming', 'install Salesforce IT Desk app on Teams', or any request to complete the IT Desk half of the Teams ITSM Go page checklist. DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Service/employee half of the checklist (service-itsm-teams-itservice-configure)."
4
+ metadata:
5
+ version: "1.0"
6
+ domains: ["Service"]
7
+ minApiVersion: "67.0"
8
+ relatedSkills:
9
+ - "service-itsm-channels-coordinate"
10
+ - "service-itsm-swarming-configure"
11
+ - "service-itsm-teams-configure"
12
+ - "service-itsm-teams-itservice-configure"
13
+ mcpTools:
14
+ headless-360:
15
+ tools: ["describe", "discover", "dispatch", "dispatch_readonly"]
16
+ semver: ">=1.0.0"
17
+ accessCheck:
18
+ - type: "orgPref"
19
+ value: "ITSMTeamsEnabled"
20
+ allowed-tools: |
21
+ Read AskUserQuestion
22
+ mcp__headless-360__discover
23
+ mcp__headless-360__describe
24
+ mcp__headless-360__dispatch
25
+ mcp__headless-360__dispatch_readonly
26
+ ---
27
+
28
+ # Set Up Salesforce IT Desk (Microsoft Teams)
29
+
30
+ Complete the **"Set Up Salesforce IT Desk"** checklist group on the Teams ITSM Go page
31
+ (`service-cloud-itsm-teams-integration`'s feature page) — the fulfiller/agent side of Teams
32
+ ITSM integration, for IT agents to swarm on and resolve tickets from Teams. Every operation
33
+ dispatches through **headless-360**.
34
+
35
+ ## Scope
36
+
37
+ - **In scope**: Turning on the `OrgHasITSMFulfillerTeams` preference; giving the user the exact
38
+ Teams marketplace link + help doc for the IT Desk app install; assigning
39
+ `TeamsForITSrvcsUser`/`MicrosoftGraphAccess` permission sets to confirmed users; delegating
40
+ "Set Teams as Collaboration Tool for Swarming" to `service-itsm-swarming-configure`.
41
+ - **Out of scope**: The base Teams Salesforce Go page toggle (`ITSMTeamsEnabled`), Azure/Entra app
42
+ registration, Named Credential population, and Teams extension/preferred-site registration —
43
+ use `service-itsm-teams-configure` (a prerequisite for this skill). The IT Service/employee
44
+ half of the checklist — use `service-itsm-teams-itservice-configure`. Enabling the
45
+ `service-cloud-swarming` Go feature itself — delegate to `service-itsm-swarming-configure`.
46
+
47
+ **Prerequisite:** run `service-itsm-teams-configure` first (or alongside) — this skill assumes
48
+ the `service-cloud-itsm-teams-integration` Go feature is already enabled.
49
+
50
+ > **Execute one step at a time.** These steps make real, state-changing API calls. Run a single
51
+ > operation, show its result, confirm it succeeded, then proceed — do not batch multiple setup
52
+ > calls into one parallel block.
53
+
54
+ ---
55
+
56
+ ## Workflow
57
+
58
+ ### Step 1 — Turn on Salesforce IT Desk
59
+
60
+ This is a straight org-preference toggle (unlike `ITSMTeamsEnabled`, this one supports direct
61
+ `PATCH`) — enable it yourself via API, do not ask the user to click the Setup toggle:
62
+
63
+ ```text
64
+ mcp__headless-360__dispatch(
65
+ method: "PATCH",
66
+ url: "/services/data/v67.0/setup/org/preferences/OrgHasITSMFulfillerTeams",
67
+ body: { "desiredState": true }
68
+ )
69
+ ```
70
+
71
+ Expect `200 {"isPreferenceEnabled": true}`. Tell the user it's enabled — do not ask them to flip
72
+ the toggle themselves.
73
+
74
+ ### Step 2 — Install Salesforce IT Desk App on Teams (user's responsibility)
75
+
76
+ There is no Salesforce or Microsoft API this skill can call to install a Teams app into a
77
+ tenant's app catalog — this always requires a human clicking "Add" in the Microsoft Teams admin
78
+ center / AppSource, signed in with sufficient tenant permissions. Give the user the exact
79
+ marketplace link and help doc; do not attempt to automate this step.
80
+
81
+ - Marketplace (verified live from the Go page's "Go to Microsoft Marketplace" button):
82
+ ```text
83
+ https://marketplace.microsoft.com/en-us/product/teams-app/WA200009869?tab=Overview
84
+ ```
85
+ - Help doc: `https://help.salesforce.com/s/articleView?id=service.it_srvce_msteams_cnfig_fulfilerhub_app.htm&type=5`
86
+
87
+ Print both together so the user has a self-service reference alongside the install link. Also tell
88
+ the user that **the Azure/Microsoft account email the fulfiller signs into Teams with must match
89
+ that Salesforce user's email / `Username`** — SSO resolves the Microsoft UPN to the Salesforce
90
+ `Username`, so a mismatch causes a silent login failure.
91
+
92
+ **Then HALT and wait** for the user to confirm the app is installed (they reply **"installed"**).
93
+ This is a human-only action; do not proceed to Step 3's user-access assignment as if it were done,
94
+ and do not fabricate the confirmation — wait for the real reply.
95
+
96
+ ### Step 3 — Manage User Access
97
+
98
+ "Manage User Access" ("Manage" button on the Go page) assigns two permission sets — verified
99
+ live from the "Manage Microsoft Teams for Employee Service User Access" dialog:
100
+
101
+ - `TeamsForITSrvcsUser` (label **"Microsoft Teams for IT Services"**, backed by PSL
102
+ `TeamsForITSrvcsPsl`)
103
+ - `MicrosoftGraphAccess` (label **"MicrosoftGraphAccess"**) — assigned alongside it in the same
104
+ dialog.
105
+
106
+ **Do not just assign every active user.** Ask the user which specific user(s) should get access.
107
+ If they want to see the list of users first (rather than naming them), page it — **show at most
108
+ 10 users per page**, then ask "want to see more?" before showing the next page, since orgs can
109
+ have hundreds or thousands of users:
110
+
111
+ ```text
112
+ mcp__headless-360__dispatch_readonly(
113
+ method: "GET",
114
+ url: "/services/data/v67.0/query",
115
+ queryParams: { "q": "SELECT Id, Name, Username, Email FROM User WHERE IsActive = true ORDER BY Name LIMIT 10 OFFSET <page * 10>" }
116
+ )
117
+ ```
118
+
119
+ **Verified gotcha:** in scratch/test orgs (and possibly some real orgs), the first page(s) of
120
+ this query are often dominated by non-employee system/integration accounts — e.g. `Automated
121
+ Process`, `Bot User`, `Insights Integration`, `*.ext` integration users, `ESW_*` / `*Site Guest
122
+ User` guest users, and `DigitalAgent.*` agent users. When presenting a page to the user, flag
123
+ these as likely-not-employee accounts (don't silently filter them out of the list — the user may
124
+ still want one assigned — but call out which rows look like system accounts so the user doesn't
125
+ have to guess). If the user says a listed batch is "not employee users, skip," move on to the
126
+ next page rather than assigning any of them.
127
+
128
+ Once the user confirms specific user(s), look up each permission set's `Id` (they are stable per
129
+ org but don't hardcode them — query fresh):
130
+
131
+ ```text
132
+ mcp__headless-360__dispatch_readonly(
133
+ method: "GET",
134
+ url: "/services/data/v67.0/query",
135
+ queryParams: { "q": "SELECT Id, Name FROM PermissionSet WHERE Name IN ('TeamsForITSrvcsUser','MicrosoftGraphAccess')" }
136
+ )
137
+ ```
138
+
139
+ Then assign both permission sets to each confirmed user via `PermissionSetAssignment` (one record
140
+ per user/permset pair — batch with as many calls as needed, there is no bulk-assign endpoint
141
+ exposed here):
142
+
143
+ ```text
144
+ mcp__headless-360__dispatch(
145
+ method: "POST",
146
+ url: "/services/data/v67.0/sobjects/PermissionSetAssignment",
147
+ body: { "AssigneeId": "<user id>", "PermissionSetId": "<permission set id>" }
148
+ )
149
+ ```
150
+
151
+ Verify by re-querying `PermissionSetAssignment` for that `AssigneeId`, or simply trust the `201`
152
+ from the assignment call plus a `SELECT ... FROM PermissionSetAssignment WHERE AssigneeId =
153
+ '<user id>' AND PermissionSetId = '<permset id>'` readback.
154
+
155
+ #### Login prerequisite — the two Manage-User-Access permsets are NOT enough to sign in (verified)
156
+
157
+ Assigning `TeamsForITSrvcsUser` + `MicrosoftGraphAccess` provisions the IT Desk *surface*, but a
158
+ fulfiller who opens the IT Desk app in Teams can still hit **"server not reachable"** on the login
159
+ page. The verified root cause is the **`ServiceCloudMSTeamsEca` External Client App OAuth
160
+ authorize being denied** — `LoginHistory` for the user shows
161
+ `Application = ServiceCloudMSTeamsEca`, `Status = Failed: Not approved for access`
162
+ (`LoginType = Remote Access 2.0`). Neither `TeamsForITSrvcsUser` nor `MicrosoftGraphAccess` clears
163
+ this, because:
164
+
165
+ 1. **They are not pre-authorized to the ECA.** The ECA's policy is `AdminApprovedPreAuthorized`
166
+ (verified: `SELECT PermittedUsersPolicyType FROM ExtlClntAppOauthPlcyCnfg WHERE
167
+ ExternalClientApplicationId = '<ecaId>'` — Tooling), so **only** users holding a permission set
168
+ explicitly pre-authorized on the ECA can complete OAuth. Check which permset that is:
169
+ `SELECT ParentId, Parent.Name FROM SetupEntityAccess WHERE SetupEntityId = '<ecaId>'` — in the
170
+ verified org the sole authorized set was **`Teams_Employee_ApiAccess`**, and the IT Desk agent did
171
+ not hold it.
172
+ 2. **They do not grant API Enabled.** Both read `PermissionsApiEnabled = false`; the embedded app's
173
+ Connect calls need the **API Enabled** system permission or they 403.
174
+
175
+ **Fix (verified to resolve the login):** also assign the fulfiller the **`Teams_Employee_ApiAccess`**
176
+ permission set — it is simultaneously the ECA-pre-authorized set **and** carries
177
+ `PermissionsApiEnabled = true`, so it clears both blockers in one assignment:
178
+
179
+ ```text
180
+ mcp__headless-360__dispatch(
181
+ method: "POST",
182
+ url: "/services/data/v67.0/sobjects/PermissionSetAssignment",
183
+ body: { "AssigneeId": "<user id>", "PermissionSetId": "<Teams_Employee_ApiAccess Id>" }
184
+ )
185
+ ```
186
+
187
+ After assigning, have the user **fully close and reopen the Teams app** (the ECA authorize is cached
188
+ client-side). Also confirm **CORS Allowed Origins** contains both `https://teams.cloud.microsoft`
189
+ and `https://cdn.scs.static.lightning.force.com` (`SELECT UrlPattern FROM CorsWhitelistEntry`). If
190
+ login still fails in a fresh session after the ECA-authorized permset is assigned, the remaining
191
+ suspect is the **"Allow OAuth for employees"** profile checkbox (Setup-UI-only — no API write path).
192
+ See `service-itsm-teams-itservice-configure`'s *Login prerequisites* and its Troubleshooting
193
+ section D (ECA self-authorization) for the full pass/fail diagnostic chain — the same ECA gates both
194
+ the fulfiller (IT Desk) and employee (IT Service) apps.
195
+
196
+ ### Step 4 — Set Teams as Collaboration Tool for Swarming (delegate)
197
+
198
+ This 4th checklist item requires the `service-cloud-swarming` Go feature to be enabled first.
199
+ **Do not enable that feature inline here — invoke the dedicated
200
+ `service-itsm-swarming-configure` skill** instead of duplicating feature-enablement logic:
201
+
202
+ ```text
203
+ Invoke the service-itsm-swarming-configure skill.
204
+ ```
205
+
206
+ That skill enables `service-cloud-swarming` **and** writes `SWARM_COLLABORATION_TOOL` to `"Teams"`
207
+ via `PATCH /services/data/v67.0/setup/org/values/SWARM_COLLABORATION_TOOL` — this checklist item
208
+ is now fully automated end-to-end, no manual "Go to Feature Page" click required.
209
+
210
+ ---
211
+
212
+ ## Gotchas
213
+
214
+ | Issue | Detail |
215
+ |-------|--------|
216
+ | Requires the Teams Salesforce Go page feature first | `OrgHasITSMFulfillerTeams` does not gate or depend on `ITSMTeamsEnabled` directly, but the Go page checklist only appears once `service-cloud-itsm-teams-integration` is enabled — run `service-itsm-teams-configure` first. |
217
+ | `OrgHasITSMFulfillerTeams` does not unblock `ITSMTeamsEnabled` | These are separate bits — enabling this preference does not itself unblock the Teams Salesforce Go page toggle preference, and vice versa. |
218
+ | "Set Teams as Collaboration Tool for Swarming" needs `service-cloud-swarming` enabled first | Delegate to `service-itsm-swarming-configure` rather than enabling that feature inline. That skill both enables the feature and writes `SWARM_COLLABORATION_TOOL` to `"Teams"` — the whole checklist item is API-reachable, not just the base feature enable. |
219
+ | Permission sets / PSLs | `TeamsForITSrvcsUser`, `MicrosoftGraphAccess` (permission sets) and PSL `TeamsForITSrvcsPsl` auto-provisioned and were confirmed `Active` (10 licenses) immediately after the feature-enable in this session — no manual PSL/permset creation needed once `TeamsITSrvcsAddOn`+`IncidentManagementAddOn` are licensed. |
220
+ | Manage-User-Access permsets don't cover login — assign `Teams_Employee_ApiAccess` too | Verified: after assigning `TeamsForITSrvcsUser` + `MicrosoftGraphAccess`, the IT Desk agent still failed Teams login with **"server not reachable"**; `LoginHistory` showed `ServiceCloudMSTeamsEca` = **"Failed: Not approved for access."** The `ServiceCloudMSTeamsEca` ECA is `AdminApprovedPreAuthorized` and its only pre-authorized permset was `Teams_Employee_ApiAccess`; neither Manage-User-Access set is authorized on the ECA, and both have `PermissionsApiEnabled = false`. Assigning `Teams_Employee_ApiAccess` (ECA-pre-authorized **and** grants API Enabled) resolved the login. See [Step 3 → Login prerequisite](#login-prerequisite--the-two-manage-user-access-permsets-are-not-enough-to-sign-in-verified). |
221
+ | Version prefix required | headless-360 `dispatch`/`dispatch_readonly` do not resolve API versions — always pass the full `/services/data/vXX.0/...` prefix. |
222
+
223
+ ---
224
+
225
+ ## Related Skills
226
+
227
+ | Skill | When to use instead / alongside |
228
+ |-------|---------------------|
229
+ | `service-itsm-teams-configure` | Enabling the base Teams Salesforce Go page toggle, Azure/Entra app registration, Named Credential population, and Teams extension registration — a prerequisite for this skill |
230
+ | `service-itsm-teams-itservice-configure` | The IT Service/employee half of the checklist (Turn on IT Service, Install IT Service app, Manage User Access, Select a Digital Experience Site) |
231
+ | `service-itsm-swarming-configure` | Enabling the `service-cloud-swarming` Go feature for "Set Teams as Collaboration Tool for Swarming" — this skill delegates to it rather than duplicating that logic |
232
+ | `service-itsm-channels-coordinate` | Top-level menu across Teams, Slack, Swarming, Notifications, Portal |
@@ -0,0 +1,391 @@
1
+ ---
2
+ name: service-itsm-teams-itservice-configure
3
+ description: "Configure the \"Set Up Salesforce IT Service\" checklist for Microsoft Teams Employee Service (ITSM) — the employee side, covering app enablement, marketplace install guidance, user access assignment, and Digital Experience Site selection. Use this for: 'turn on Salesforce IT Service', 'set up IT Service on Teams', 'assign Teams for Employee permission set', 'give employees access to Teams for Employee Service', 'manage user access for Teams ITSM', 'grant users the permission sets needed for Teams Employee Service', 'select a digital experience site for Teams', 'install Salesforce IT Service app on Teams', or any request to complete the IT Service half of the Teams ITSM Go page checklist (including the Manage User Access step). DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Desk/fulfiller half of the checklist (service-itsm-teams-itdesk-configure)."
4
+ metadata:
5
+ version: "1.0"
6
+ domains: ["Service", "Experience"]
7
+ minApiVersion: "67.0"
8
+ relatedSkills:
9
+ - "service-itsm-channels-coordinate"
10
+ - "service-itsm-teams-configure"
11
+ - "service-itsm-teams-debug"
12
+ - "service-itsm-teams-employee-agent-configure"
13
+ - "service-itsm-teams-itdesk-configure"
14
+ mcpTools:
15
+ headless-360:
16
+ tools: ["describe", "discover", "dispatch", "dispatch_readonly"]
17
+ semver: ">=1.0.0"
18
+ accessCheck:
19
+ - type: "orgPref"
20
+ value: "ITSMTeamsEnabled"
21
+ allowed-tools: |
22
+ Read AskUserQuestion
23
+ mcp__headless-360__discover
24
+ mcp__headless-360__describe
25
+ mcp__headless-360__dispatch
26
+ mcp__headless-360__dispatch_readonly
27
+ ---
28
+
29
+ # Set Up Salesforce IT Service (Microsoft Teams)
30
+
31
+ Complete the **"Set Up Salesforce IT Service"** checklist group on the Teams ITSM Go page
32
+ (`service-cloud-itsm-teams-integration`'s feature page) — the employee side of Teams ITSM
33
+ integration, for employees to create and manage their own tickets from Teams. Every operation
34
+ dispatches through **headless-360**.
35
+
36
+ ## Scope
37
+
38
+ - **In scope**: Turning on the `OrgHasEmployeeServiceTeams` preference; giving the user the
39
+ exact Teams marketplace link + help doc for the IT Service app install; assigning
40
+ `TeamsForEmployeeUser`/`MicrosoftGraphAccess` permission sets to confirmed users; selecting the
41
+ Digital Experience Site to link with Teams via the `SLACK_PREFERRED_SITE` org value.
42
+ - **Out of scope**: The base Teams Salesforce Go page toggle (`ITSMTeamsEnabled`), Azure/Entra app
43
+ registration, Named Credential population, and Teams extension/preferred-site registration —
44
+ use `service-itsm-teams-configure` (a prerequisite for this skill). The IT Desk/fulfiller half
45
+ of the checklist — use `service-itsm-teams-itdesk-configure`.
46
+
47
+ **Prerequisite:** run `service-itsm-teams-configure` first (or alongside) — this skill assumes
48
+ the `service-cloud-itsm-teams-integration` Go feature is already enabled.
49
+
50
+ > **Execute one step at a time.** These steps make real, state-changing API calls. Run a single
51
+ > operation, show its result, confirm it succeeded, then proceed — do not batch multiple setup
52
+ > calls into one parallel block.
53
+
54
+ ---
55
+
56
+ ## Workflow
57
+
58
+ ### Step 1 — Turn on Salesforce IT Service
59
+
60
+ This is a straight org-preference toggle (unlike `ITSMTeamsEnabled`, this one supports direct
61
+ `PATCH`) — enable it yourself via API, do not ask the user to click the Setup toggle:
62
+
63
+ ```text
64
+ mcp__headless-360__dispatch(
65
+ method: "PATCH",
66
+ url: "/services/data/v67.0/setup/org/preferences/OrgHasEmployeeServiceTeams",
67
+ body: { "desiredState": true }
68
+ )
69
+ ```
70
+
71
+ Expect `200 {"isPreferenceEnabled": true}`. Tell the user it's enabled — do not ask them to flip
72
+ the toggle themselves.
73
+
74
+ ### Step 2 — Install Salesforce IT Service App on Teams (user's responsibility)
75
+
76
+ There is no Salesforce or Microsoft API this skill can call to install a Teams app into a
77
+ tenant's app catalog — this always requires a human clicking "Add" in the Microsoft Teams admin
78
+ center / AppSource, signed in with sufficient tenant permissions. Give the user the exact
79
+ marketplace link and help doc; do not attempt to automate this step.
80
+
81
+ - Marketplace (verified live from the Go page's "Go to Microsoft Marketplace" button):
82
+ ```text
83
+ https://marketplace.microsoft.com/en-us/product/teams-app/WA200009838?tab=Overview
84
+ ```
85
+ - Help doc: `https://help.salesforce.com/s/articleView?id=service.it_srvcs_msteams_config_emplye_srvcs_app.htm&type=5`
86
+
87
+ Print both together. Also tell the user **the Microsoft email the employee signs in with must match
88
+ that Salesforce user's `Username`** (SSO maps MS UPN → `Username`; a mismatch fails login silently).
89
+ **Then HALT** until the user replies **"installed"** — a human-only action; do not proceed or
90
+ fabricate the confirmation.
91
+
92
+ ### Step 3 — Manage User Access
93
+
94
+ "Manage User Access" ("Manage" button on the Go page) assigns two permission sets — verified
95
+ live from the "Manage Microsoft Teams for Employee Service User Access" dialog:
96
+
97
+ - `TeamsForEmployeeUser` (label **"Teams for Employee"**, backed by PSL `TeamsForEmployeePsl`)
98
+ - `MicrosoftGraphAccess` (label **"MicrosoftGraphAccess"**) — assigned alongside it in the same
99
+ dialog.
100
+
101
+ **Do not just assign every active user.** Ask the user which specific user(s) should get access.
102
+ If they want to see the list of users first (rather than naming them), page it — **show at most
103
+ 10 users per page**, then ask "want to see more?" before showing the next page, since orgs can
104
+ have hundreds or thousands of users:
105
+
106
+ ```text
107
+ mcp__headless-360__dispatch_readonly(
108
+ method: "GET",
109
+ url: "/services/data/v67.0/query",
110
+ queryParams: { "q": "SELECT Id, Name, Username, Email FROM User WHERE IsActive = true ORDER BY Name LIMIT 10 OFFSET <page * 10>" }
111
+ )
112
+ ```
113
+
114
+ **Verified gotcha:** in scratch/test orgs (and possibly some real orgs), the first page(s) of
115
+ this query are often dominated by non-employee system/integration accounts — e.g. `Automated
116
+ Process`, `Bot User`, `Insights Integration`, `*.ext` integration users, `ESW_*` / `*Site Guest
117
+ User` guest users, and `DigitalAgent.*` agent users. When presenting a page to the user, flag
118
+ these as likely-not-employee accounts (don't silently filter them out of the list — the user may
119
+ still want one assigned — but call out which rows look like system accounts so the user doesn't
120
+ have to guess). If the user says a listed batch is "not employee users, skip," move on to the
121
+ next page rather than assigning any of them.
122
+
123
+ Once the user confirms specific user(s), look up each permission set's `Id` (they are stable per
124
+ org but don't hardcode them — query fresh):
125
+
126
+ ```text
127
+ mcp__headless-360__dispatch_readonly(
128
+ method: "GET",
129
+ url: "/services/data/v67.0/query",
130
+ queryParams: { "q": "SELECT Id, Name FROM PermissionSet WHERE Name IN ('TeamsForEmployeeUser','MicrosoftGraphAccess')" }
131
+ )
132
+ ```
133
+
134
+ Then assign both permission sets to each confirmed user via `PermissionSetAssignment` (one record
135
+ per user/permset pair — batch with as many calls as needed, there is no bulk-assign endpoint
136
+ exposed here):
137
+
138
+ ```text
139
+ mcp__headless-360__dispatch(
140
+ method: "POST",
141
+ url: "/services/data/v67.0/sobjects/PermissionSetAssignment",
142
+ body: { "AssigneeId": "<user id>", "PermissionSetId": "<permission set id>" }
143
+ )
144
+ ```
145
+
146
+ Verify by re-querying `PermissionSetAssignment` for that `AssigneeId`, or simply trust the `201`
147
+ from the assignment call plus a `SELECT ... FROM PermissionSetAssignment WHERE AssigneeId =
148
+ '<user id>' AND PermissionSetId = '<permset id>'` readback.
149
+
150
+ #### Login prerequisites (required for the user to actually sign in to IT Service in Teams)
151
+
152
+ Assigning the two permission sets above is necessary but **not sufficient** — a UEL user who
153
+ opens the IT Service app in Teams can still hit a silent login failure unless all three of the
154
+ following are also in place. Verify (and set) these as part of enabling a user:
155
+
156
+ 1. **"Allow OAuth for employees"** on the employee login profile (e.g. **Unified Employee**) —
157
+ Setup → Profiles → *(profile)* → Session Settings → check **Allow OAuth for employees**.
158
+ **Set this in the Setup UI.** It is **not** a Profile SObject field (no OAuth field appears in
159
+ `Profile` describe) and it is **not** the Metadata element `Profile.sessionSettings.allowOauthForEmployees`
160
+ — a Profile metadata deploy containing `<sessionSettings><allowOauthForEmployees>` **fails
161
+ validation**: `Element {…}sessionSettings invalid at this location in type Profile` (verified
162
+ Aug 2026). Nor is it readable/writable via the headless-360 Connect/REST/Tooling dispatch. Use
163
+ the Setup UI checkbox. Confirmed blocker: with it off, the OAuth handshake for the embedded app
164
+ fails and login silently does not complete — the community **login succeeds** (LoginHistory
165
+ "Employee Login to Community" = Success) but **no `OauthToken` is ever minted** for the user, and
166
+ the Teams app re-pops its "Single Sign-On / Login with URL" chooser (often with a
167
+ `/…/setup/secur/RemoteAccessAuthorizationPage` "Service Not Available" popup).
168
+
169
+ 2. **CORS Allowed Origins** must include **both** Teams origins. Check with
170
+ `dispatch_readonly GET /services/data/v67.0/query` on
171
+ `SELECT Id, UrlPattern FROM CorsWhitelistEntry`, and create any that are missing with
172
+ `dispatch POST /services/data/v67.0/sobjects/CorsWhitelistEntry` body
173
+ `{"UrlPattern": "<origin>"}` (this is a **data-API sobject**, not a Tooling type — a Tooling
174
+ `POST`/query returns `NOT_FOUND`/`INVALID_TYPE`):
175
+ - `https://teams.cloud.microsoft`
176
+ - `https://cdn.scs.static.lightning.force.com` — the Lightning static-resource CDN the embedded
177
+ IT Service surface loads from. Confirmed blocker: with this origin missing (even when
178
+ `teams.cloud.microsoft` is present), the browser blocks the asset/OAuth preflight and login
179
+ silently fails. After adding it, have the user hard-refresh / clear the Teams app cache.
180
+
181
+ 3. **"API Enabled"** system permission on the user. The UEL user must have the **API Enabled**
182
+ system permission — grant it via a permission set (create/choose a permission set → **System
183
+ Settings** → check **API Enabled** → assign to the user), not just the base profile. Without
184
+ it the embedded app's API calls are rejected and the user can't sign in.
185
+
186
+ If a user reports "can't log in to IT Service in Teams" and Steps 1–4 all look done, walk these
187
+ three prerequisites first — they are the most common silent-login blockers. For the full pass/fail
188
+ diagnostic sequence (including the OAuth-token-mint check that isolates a portal-user OAuth failure),
189
+ see [Troubleshooting: Teams for Employee Service login & agent](#troubleshooting-teams-for-employee-service-login--agent) below.
190
+
191
+ ### Step 4 — Select a Digital Experience Site
192
+
193
+ This checklist item ("Digital Experience Site Name" dropdown, currently "None" until set) is
194
+ **not** the same API as `service-itsm-teams-configure`'s Teams extension registration
195
+ (`/connect/service-itsm-teams/graph-api/extensions`) — that one requires the Azure/Entra
196
+ credential and is gated by the `MsTeamsAppApiFamily` license blocker (see that skill's Gotchas).
197
+ This checklist item instead reads/writes the org-value `SLACK_PREFERRED_SITE` — the same
198
+ `OrgValueUtil.OrgValues` Java-enum mechanism as Swarming's `SWARM_COLLABORATION_TOOL` — and is
199
+ **not gated by any Teams license**, so it works even when the extension registration is blocked.
200
+
201
+ 1. List all Digital Experience sites in the org:
202
+ ```text
203
+ mcp__headless-360__dispatch_readonly(method: "GET", url: "/services/data/v67.0/connect/communities")
204
+ ```
205
+ 2. Present the full list to the user and ask them to pick one. **If they don't choose, pick one
206
+ yourself** (the only site if there's exactly one, otherwise a sensible default such as the most
207
+ recently modified `Live` site) **and explicitly tell the user which one you picked** — don't
208
+ proceed silently.
209
+ 3. Check the current value first (skip the write if already set to the chosen site's Id):
210
+ ```text
211
+ mcp__headless-360__dispatch_readonly(method: "GET", url: "/services/data/v67.0/setup/org/values/SLACK_PREFERRED_SITE")
212
+ ```
213
+ `stringValue` holds the current selection — the chosen site's `Id`, or `"None"`.
214
+ 4. Write the selection using the site's `Id` (from step 1's `connect/communities` response — the
215
+ `Network` record Id, **not** `urlPathPrefix`):
216
+ ```text
217
+ mcp__headless-360__dispatch(
218
+ method: "PATCH",
219
+ url: "/services/data/v67.0/setup/org/values/SLACK_PREFERRED_SITE",
220
+ body: { "orgValue": "<site Id>" }
221
+ )
222
+ ```
223
+ Verified live: `PATCH` with a site's Network `Id` (e.g. `0DBSB000002EYwj4AG`) returned
224
+ `200 {"stringValue": "<that Id>", ...}`, and a follow-up `GET` confirmed the same value
225
+ persisted.
226
+ 5. Re-run step 3's `GET` to confirm.
227
+
228
+ ### Step 5 — Make the embedded Agentforce agent reply in Teams
229
+
230
+ Completing Steps 1–4 provisions the IT Service surface, but it does **not** make the embedded
231
+ Agentforce agent actually **reply** inside the Teams custom client ("Salesforce Employee Assist" /
232
+ "Ask AI Agent"). That is the final, hardest part of IT Service agent setup and is covered by a
233
+ dedicated skill:
234
+
235
+ **→ `service-itsm-teams-employee-agent-configure`**
236
+
237
+ Invoke it (or hand off to it) after Step 4 when the user wants the in-Teams agent to respond. It
238
+ covers the verified architecture — a Web channel with **User Verification ON + a `JWKS_URL` Key
239
+ Set**, the `Teams_AgentForce` deployment, an Omni-Flow routing flow to a **real, Active** agent, and
240
+ an **Agent Access permission set** on the portal user — plus the diagnostic for the common "agent
241
+ joins then leaves" symptom (auth ON but no Key Set, or missing Agent Access). The
242
+ per-user Agent Access assignment there is the natural follow-on to the Manage User Access step
243
+ (Step 3) above.
244
+
245
+ **Verified gotcha — UI shows stale "None" after the API write.** The Go page's dropdown is a wired
246
+ LDS cache over this org-value; a raw Connect `PATCH` doesn't invalidate it. The write is real and
247
+ durable (a follow-up `GET` confirms it) — if the Setup page is open, tell the user to **hard-refresh
248
+ the tab** to see the new selection.
249
+
250
+ **Naming is misleading — this is a shared, cross-feature setting, not Teams-exclusive.** Despite
251
+ the `SLACK_` prefix (a holdover from this org-value's original Slack-ITSM use case), it backs
252
+ the "Select a Digital Experience Site" picker on **both** the Teams ITSM Go page and the
253
+ equivalent Slack ITSM Go page — writing it from one surface changes what the other surface
254
+ shows. If the user has also configured Slack ITSM, flag that setting this will also change
255
+ Slack's preferred site.
256
+
257
+ ---
258
+
259
+ ## Gotchas
260
+
261
+ | Issue | Detail |
262
+ |-------|--------|
263
+ | Requires the Teams Salesforce Go page feature first | `OrgHasEmployeeServiceTeams` does not gate or depend on `ITSMTeamsEnabled` directly, but the Go page checklist only appears once `service-cloud-itsm-teams-integration` is enabled — run `service-itsm-teams-configure` first. |
264
+ | `OrgHasEmployeeServiceTeams` does not unblock `ITSMTeamsEnabled` | These are separate bits — enabling this preference does not itself unblock the Teams Salesforce Go page toggle preference, and vice versa. |
265
+ | "Select a Digital Experience Site" ≠ Teams extension registration — two different site-related APIs, don't conflate | This checklist item writes the org-value `SLACK_PREFERRED_SITE` via `PATCH /services/data/v67.0/setup/org/values/SLACK_PREFERRED_SITE` (body `{"orgValue": "<site Id>"}`) — **not gated by `MsTeamsAppApiFamily`**, works with no Azure/Entra credential required. `service-itsm-teams-configure`'s `POST /connect/service-itsm-teams/graph-api/extensions` is a *different* mechanism (Teams "extension" registration) that **does** require the Azure credential and **is** gated by `MsTeamsAppApiFamily`. Verified live: `PATCH .../setup/org/values/SLACK_PREFERRED_SITE` with a site's Network `Id` succeeded (`200`) in an org where `post-teams-extension` was still blocked with "Unable to fetch tenant ID." Also note despite the `SLACK_` name, this org-value is shared with the Slack ITSM integration's equivalent picker — not Teams-exclusive. |
266
+ | Permission sets / PSLs | `TeamsForEmployeeUser`, `MicrosoftGraphAccess` (permission sets) and PSL `TeamsForEmployeePsl` auto-provisioned and were confirmed `Active` (10 licenses) immediately after the feature-enable in this session — no manual PSL/permset creation needed once `TeamsITSrvcsAddOn`+`IncidentManagementAddOn` are licensed. |
267
+ | Version prefix required | headless-360 `dispatch`/`dispatch_readonly` do not resolve API versions — always pass the full `/services/data/vXX.0/...` prefix. |
268
+ | UEL user can't log in to IT Service in Teams | Assigning `TeamsForEmployeeUser`/`MicrosoftGraphAccess` is not enough. Three additional prerequisites gate login (see [Step 3 → Login prerequisites](#login-prerequisites-required-for-the-user-to-actually-sign-in-to-it-service-in-teams)): **Allow OAuth for employees** on the login profile (**Setup-UI-only** — no working Metadata/SObject/Tooling write path; verified all fail), CORS Allowed Origins containing both `https://teams.cloud.microsoft` **and** `https://cdn.scs.static.lightning.force.com`, and the **API Enabled** system permission on the user. Each is independently a confirmed silent-login blocker. |
269
+
270
+ ---
271
+
272
+ ## Troubleshooting: Teams for Employee Service login & agent
273
+
274
+ When a user reports a Teams for Employee Service failure (can't log in, "Service Not Available"
275
+ popup, agent won't reply), run these checks **in order** — each is a pass/fail gate with an exact
276
+ query and remediation. Stop at the first one that fails; they are ordered from most-common and
277
+ cheapest to deepest.
278
+
279
+ > For a **broader** guided diagnosis across all Teams ITSM symptoms (IT Desk login, feature
280
+ > enablement, tab loading, service catalog, Agentforce, Swarming, SSO — not just IT Service login),
281
+ > use the dedicated **`service-itsm-teams-debug`** skill, which routes the reported problem
282
+ > to the matching pass/fail checklist. The sequence below is the IT-Service-login-focused subset.
283
+
284
+ > Run the read-only checks with `dispatch_readonly` (a Tooling-object check is noted where the
285
+ > query needs the Tooling API). Convert the placeholder ids to the real ones you find as you go.
286
+
287
+ ### A. Community login itself
288
+
289
+ ```text
290
+ SELECT LoginTime, Status, LoginType FROM LoginHistory
291
+ WHERE UserId='<userId>' ORDER BY LoginTime DESC LIMIT 5
292
+ ```
293
+
294
+ - **`No community access`** → the site's `Network.OptionsAllowInternalUserLogin` is off for an
295
+ internal/UEL user. Enable "Allow internal users to log in directly" on the site's login settings
296
+ (see the portal-create skill's internal-login flag). **Different failure** from the ones below —
297
+ fix this first if present.
298
+ - **`Employee Login to Community` = `Success`** → login works; the failure is downstream in OAuth
299
+ or agent runtime. Continue to B.
300
+
301
+ ### B. The three silent-login prerequisites (see [Step 3 → Login prerequisites](#login-prerequisites-required-for-the-user-to-actually-sign-in-to-it-service-in-teams))
302
+
303
+ 1. **Allow OAuth for employees** on the login profile (Setup-UI-only checkbox). No API read path —
304
+ verify by the OAuth-token check in **C** below (its real symptom).
305
+ 2. **CORS Allowed Origins** — must contain **both** origins:
306
+ ```text
307
+ SELECT Id, UrlPattern FROM CorsWhitelistEntry
308
+ ```
309
+ Missing `https://teams.cloud.microsoft` **or** `https://cdn.scs.static.lightning.force.com` →
310
+ create it (`POST /sobjects/CorsWhitelistEntry` `{"UrlPattern":"<origin>"}`), then hard-refresh.
311
+ 3. **API Enabled** system permission on the user (via a permission set, not just the profile).
312
+
313
+ ### C. OAuth token mint — the decisive portal-user check
314
+
315
+ This is the check that isolates a portal/UEL OAuth failure from a login failure. After the user
316
+ retries login from a **fresh** Teams chat:
317
+
318
+ ```text
319
+ SELECT Id, AppName, UserId, User.Username, CreatedDate FROM OauthToken
320
+ WHERE AppName='ServiceCloudMSTeamsEca'
321
+ ```
322
+
323
+ - **A token row exists for the failing user** → OAuth succeeded; the problem is agent-runtime, not
324
+ login — jump to **E**.
325
+ - **No token for the failing user, but community login shows `Success` (B)** → the OAuth
326
+ **authorize** step never minted a token. This is the "Service Not Available" popup on
327
+ `/<sitePrefix>/setup/secur/RemoteAccessAuthorizationPage`. Work through **D**.
328
+
329
+ > **Diagnostic tell (verified):** if a **Standard-profile** user mints a `ServiceCloudMSTeamsEca`
330
+ > token but a **Unified Employee (UEL) / portal** user does not — even with identical permission
331
+ > sets — the blocker is specific to the portal-user OAuth authorize path (profile OAuth flag, or
332
+ > the ECA self-authorization page being served on the community host), **not** the ECA
333
+ > authorization grant. In the verified org the Standard user minted a token *without* even holding
334
+ > the ECA-authorizing permission set, while the UEL user holding everything did not — so an
335
+ > identical permission-set/SetupEntityAccess config does **not** explain the difference.
336
+
337
+ ### D. ECA (External Client App) OAuth self-authorization
338
+
339
+ The `ServiceCloudMSTeamsEca` External Client App gates the OAuth authorize. Symptom: the Teams
340
+ popup titled **"Service Not Available / An unexpected connection error occurred"** at
341
+ `/<sitePrefix>/setup/secur/RemoteAccessAuthorizationPage`, and/or an access-check error body
342
+ **`{"acc":8}`** on the streaming endpoint.
343
+
344
+ 1. **Policy must be `AdminApprovedPreAuthorized`** (not `AllSelfAuthorized`):
345
+ ```text
346
+ SELECT Id, PermittedUsersPolicyType FROM ExtlClntAppOauthPlcyCnfg
347
+ WHERE ExternalClientApplicationId='<ecaId>' (Tooling)
348
+ ```
349
+ `AllSelfAuthorized` forces every user through the self-approval page, which **communities
350
+ cannot serve** (`/setup/secur/*` is a Setup page) → the connection error. Fix by editing the
351
+ `ExternalClientApplication`'s OAuth policy **via Metadata** (the Tooling object is read-only —
352
+ `update` → `CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY`): retrieve
353
+ `ExtlClntAppOauthConfigurablePolicies:<Eca>_oauth_defaultPolicy`, set
354
+ `<permittedUsersPolicyType>AdminApprovedPreAuthorized</permittedUsersPolicyType>`, redeploy.
355
+ (Valid enum values are only `AllSelfAuthorized` and `AdminApprovedPreAuthorized` — `AdminApproved`
356
+ is invalid.)
357
+ 2. **Pre-authorize the ECA to a permission set the user holds** — `AdminApprovedPreAuthorized`
358
+ denies everyone not explicitly authorized (surfaces as `{"acc":8}`):
359
+ ```text
360
+ SELECT ParentId, SetupEntityType FROM SetupEntityAccess WHERE SetupEntityId='<ecaId>'
361
+ ```
362
+ If missing, create `SetupEntityAccess {ParentId=<permsetId the user has>, SetupEntityId=<ecaId>}`
363
+ (no `SetupEntityType` — it auto-resolves to `ExternalClientApplication`).
364
+ 3. **If policy is `AdminApprovedPreAuthorized`, the user holds an authorized permission set, and
365
+ "Allow OAuth for employees" is on — yet the token still doesn't mint for the portal user
366
+ (per C):** the remaining suspect is that the OAuth authorize is being routed to the
367
+ **community host** (`https://<org>.my.site.com/<prefix>/setup/secur/...`), which cannot render
368
+ the authorization page, rather than to My Domain. This ECA is **packaged/first-party** — do NOT
369
+ hand-edit its `callbackUrl`/`isFirstPartyAppEnabled`/`oauthLink`. At this point capture the exact
370
+ popup URL + any `acc` code and escalate to the Teams ITSM / ECA product team; it is beyond a
371
+ configurable-setting fix.
372
+
373
+ ### E. Embedded Agentforce agent joins then leaves (no reply)
374
+
375
+ If login + OAuth succeed but the "Ask AI Agent" agent won't reply, hand off to
376
+ `service-itsm-teams-employee-agent-configure` — the two verified fixes are (1) the `Teams_AgentForce`
377
+ channel's **User Verification ON backed by a `JWKS_URL` Key Set** and (2) an **Agent Access** permission set enabling the IT
378
+ Service Employee Agent on the portal user. That skill's reference has the full runtime-chain
379
+ diagnostics (scrt2 token, SSE 401, `ConversationEntry` queries).
380
+
381
+ ---
382
+
383
+ ## Related Skills
384
+
385
+ | Skill | When to use instead / alongside |
386
+ |-------|---------------------|
387
+ | `service-itsm-teams-configure` | Enabling the base Teams Salesforce Go page toggle, Azure/Entra app registration, Named Credential population, and Teams extension registration — a prerequisite for this skill |
388
+ | `service-itsm-teams-itdesk-configure` | The IT Desk/fulfiller half of the checklist (Turn on IT Desk, Install IT Desk app, Manage User Access, Set Teams as Collaboration Tool for Swarming) |
389
+ | `service-itsm-teams-employee-agent-configure` | The final part of IT Service agent setup — making the embedded Agentforce agent actually **reply** in the Teams custom client (Web channel, User Verification ON + `JWKS_URL` Key Set, `Teams_AgentForce` deployment, routing flow to a real Active agent, Agent Access permission set). Hand off to it after Step 4. |
390
+ | `service-itsm-teams-debug` | Diagnosing a failing Teams ITSM setup across any symptom (login, feature enablement, tab loading, Agentforce, Swarming, SSO) — routes the problem to a pass/fail checklist and reports remediation |
391
+ | `service-itsm-channels-coordinate` | Top-level menu across Teams, Slack, Swarming, Notifications, Portal |