@squadbase/connectors 0.1.2-dev.7 → 0.1.2-dev.8
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.
- package/dist/{chunk-YXL7FUX2.js → chunk-HEEAFFVP.js} +1 -1
- package/dist/index.js +14 -2
- package/dist/sdk.js +1 -1
- package/package.json +1 -1
|
@@ -385,7 +385,7 @@ var parameters18 = {
|
|
|
385
385
|
clientId: new ParameterDefinition({
|
|
386
386
|
slug: "client-id",
|
|
387
387
|
name: "Azure AD Client ID",
|
|
388
|
-
description: "The Application (client) ID from your Azure AD app registration. Required API Permissions (Application, admin consent required): Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, Chat.Read.All, User.Read.All",
|
|
388
|
+
description: "The Application (client) ID from your Azure AD app registration. Required API Permissions (Application type, admin consent required): Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, Chat.Read.All, User.Read.All (or their higher-level equivalents such as Team.Read.All, Channel.Read.All, etc.)",
|
|
389
389
|
envVarBaseKey: "MS_TEAMS_CLIENT_ID",
|
|
390
390
|
type: "text",
|
|
391
391
|
secret: false,
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parameters7,
|
|
19
19
|
parameters8,
|
|
20
20
|
parameters9
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HEEAFFVP.js";
|
|
22
22
|
|
|
23
23
|
// src/connector-setup.ts
|
|
24
24
|
var ConnectorSetup = class {
|
|
@@ -6468,9 +6468,21 @@ const data = await res.json();
|
|
|
6468
6468
|
- Pagination uses \`@odata.nextLink\` URL in the response
|
|
6469
6469
|
- Required API permissions: Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, Chat.Read.All, User.Read.All
|
|
6470
6470
|
|
|
6471
|
+
### Important: Permission Validation (MUST DO FIRST)
|
|
6472
|
+
Before proceeding with any data exploration or server logic creation, you MUST validate that the Azure AD app has the required permissions:
|
|
6473
|
+
|
|
6474
|
+
1. After obtaining the access token, call \`GET /teams\` and \`GET /users\` as a permission check
|
|
6475
|
+
2. **If ANY of these calls return an empty array (\`{ "value": [] }\`) or an error, STOP immediately** and inform the user:
|
|
6476
|
+
- "Your Azure AD app registration appears to be missing required API permissions. Microsoft Graph API returns empty results when permissions are not granted."
|
|
6477
|
+
- "Please go to Azure Portal > App registrations > [Your App] > API permissions and add the following **Application** permissions (not Delegated), then click 'Grant admin consent':"
|
|
6478
|
+
- Team.ReadBasic.All (or Team.Read.All), Channel.ReadBasic.All (or Channel.Read.All), ChannelMessage.Read.All (or ChannelMessage.ReadWrite.All), Chat.Read.All (or Chat.ReadWrite.All), User.Read.All (or User.ReadWrite.All)
|
|
6479
|
+
- **Do NOT proceed with setup or create server logics until the user confirms permissions have been granted and you can verify non-empty results.**
|
|
6480
|
+
3. Only proceed with data exploration and server logic creation after confirming that API calls return actual data
|
|
6481
|
+
|
|
6471
6482
|
### Troubleshooting
|
|
6472
6483
|
- If the token request returns an error, verify that the Client ID, Client Secret, and Tenant ID are correct
|
|
6473
|
-
- If Graph API returns **
|
|
6484
|
+
- **If Graph API returns 200 OK but with empty results** (\`{ "value": [] }\`), this almost always means the Azure AD app is missing required Application permissions or admin consent has not been granted. Do NOT interpret empty results as "no data yet" \u2014 treat it as a permission issue and ask the user to verify permissions in Azure Portal
|
|
6485
|
+
- If Graph API returns **403 Forbidden**, the Azure AD app is missing required Application permissions or admin consent has not been granted. Ask the user to go to Azure Portal > App registrations > API permissions and grant admin consent for the required permissions (or their higher-level equivalents): Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, Chat.Read.All, User.Read.All
|
|
6474
6486
|
- If Graph API returns **401 Unauthorized**, the access token may be invalid or expired \u2014 re-acquire it using the client credentials flow`,
|
|
6475
6487
|
tools: tools31
|
|
6476
6488
|
});
|
package/dist/sdk.js
CHANGED