@squadbase/connectors 0.1.2-dev.8 → 0.1.2-dev.9
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/index.js +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6469,15 +6469,16 @@ const data = await res.json();
|
|
|
6469
6469
|
- Required API permissions: Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, Chat.Read.All, User.Read.All
|
|
6470
6470
|
|
|
6471
6471
|
### Important: Permission Validation (MUST DO FIRST)
|
|
6472
|
-
Before
|
|
6472
|
+
Before creating any dashboard or data server logics, you MUST first create a **permission check server logic** to validate that the Azure AD app has the required permissions:
|
|
6473
6473
|
|
|
6474
|
-
1.
|
|
6475
|
-
2.
|
|
6474
|
+
1. Create a server logic that uses \`connection("<connectionId>")\` to obtain the credentials, then acquires an access token and calls \`GET /teams\` and \`GET /users\`
|
|
6475
|
+
2. Run this permission check server logic and inspect the results
|
|
6476
|
+
3. **If ANY of these calls return an empty array (\`{ "value": [] }\`) or an error, STOP immediately** and inform the user:
|
|
6476
6477
|
- "Your Azure AD app registration appears to be missing required API permissions. Microsoft Graph API returns empty results when permissions are not granted."
|
|
6477
6478
|
- "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
6479
|
- 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
|
-
|
|
6480
|
+
- **Do NOT proceed with setup or create further server logics until the user confirms permissions have been granted and you can verify non-empty results.**
|
|
6481
|
+
4. Only proceed with data exploration and dashboard server logic creation after confirming that the permission check returns actual data (non-empty arrays)
|
|
6481
6482
|
|
|
6482
6483
|
### Troubleshooting
|
|
6483
6484
|
- If the token request returns an error, verify that the Client ID, Client Secret, and Tenant ID are correct
|