Skip to content

fix(microsoft): validate Microsoft integrations, return dropped fields and expose missing params - #9949

Merged
waleedlatif1 merged 7 commits into
stagingfrom
fix/microsoft-suite-validation
Nov 12, 2026
Merged

waleedlatif1 merged 7 commits into
stagingfrom
fix/microsoft-suite-validation

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Outlook:
    • Read, search and the Outlook trigger now return bccRecipients, replyTo, internetMessageId, conversationId, categories, flag, isDraft and webLink. The trigger $select now requests them.
    • Send and Draft gain replyTo and importance. Reply and Forward gain Cc/Bcc; Reply All gains Bcc.
    • Send in reply mode now sends { message } only. It sent comment and message.body together, which Graph rejects with 400.
    • Trigger attachment fetches use the bounded $value download with a shared byte budget. They previously inlined base64 for every attachment.
  • Teams:
    • Get Message, Add Reaction and Remove Reaction now show their chat and channel inputs on the canvas. Before, they always threw.
    • Scalar outputs (messageId, chatId, url, sender, …) are now emitted at the top level as well as under metadata. The top-level copies were always undefined.
    • Messages return the bot/app sender, replyToId, subject, importance, webUrl, mentions, reactions and edit times.
    • Read Chat and Read Channel get top/pageToken paging, and Read Channel gets includeReplies.
    • Reply and update gain contentType (default stays text).
    • The chat trigger returns the same message fields, and its attachment reads are byte-capped.
  • OneDrive / Word:
    • Items return createdBy, lastModifiedBy, parentReference, folder.childCount and eTag.
    • List and search gain orderBy. Share links gain expirationDateTime.
    • Upload conflictBehavior is now reachable.
    • Word Graph JSON reads are capped.
  • SharePoint:
    • Upload rejects dot-segment traversal in folderPath/fileName.
    • Read List gains filter, top and selectFields, and List Sites gains searchQuery.
    • Items and pages return the documented audit and publishing fields.
    • Page content is no longer logged.
  • Excel:
    • Read gains valuesOnly (default unchanged).
    • Quoted sheet names work on sheet-only reads.
  • Planner / Intune:
    • Read Task returns the documented task fields and full assignee detail.
    • Intune devices return 22 more v1.0 fields, including deviceActionResults.
    • Policies return odataType.
  • Entra ID:
    • New List User Memberships operation (microsoft_ad_list_user_memberships, direct or transitive).
    • Users return more profile fields. Get User gains an opt-in includeManager.
    • Member lists return userPrincipalName.
  • Power BI: reports return format, isOwnedByMe, appId and originalReportId.
  • Dataverse:
    • List Records gains pageSize and same-origin nextLink paging.
    • Update Record gains returnRecord.
    • Search sends top/skip as numbers and surfaces search errors.
  • Azure DevOps:
    • Work items return description, iteration, tags, priority, created/changed metadata, relations and the full field map.
    • WIQL link queries hydrate their items.
    • Builds and pipelines return continuation tokens. Builds gain the documented filters.
    • Timelines return issues.
    • The block exposes the tool params it was dropping.
  • Azure Data Explorer:
    • Batch queries return every result table (additionalResults).
    • A byte budget truncates results that would previously have failed the tool response cap.
  • All: path IDs go through safeUrlPathSegment. Valid Graph ids (ABC!123, base64 ids with =, 19:…@thread.v2, host,guid,guid) encode as before.
  • Backwards compatibility:
    • No param, subBlock id, operation value, tool id or output was removed, renamed or retyped, and no defaults changed.
    • New params are optional and unset by default; new outputs are optional.
    • New inputs that apply to an existing operation use dedicated subBlock ids (for example AzDO queryTop, pipelinesTop, commentsTop, updateIterationPath and SharePoint itemSelectFields), so a stale value from another operation never starts flowing into a saved workflow.
    • Deliberate behaviour changes:
      • Outlook reply mode sends { message } only; the old comment + message.body body always returned 400.
      • SharePoint empty Read List returns items: [] instead of lists: [].
      • SharePoint nextPageUrl from a different collection is rejected.
      • SharePoint upload rejects traversal and ./.. file names.
      • Dataverse search errors now fail instead of returning empty results.
      • ADX truncates (truncated: true) instead of failing at the 10 MB tool response cap.
      • Teams Get Message and reactions now run from the canvas, and Teams scalar outputs resolve.
      • Teams trigger attachments share a 100 MB per-notification byte budget. An attachment over the budget is skipped with a warning instead of buffering unbounded.

Type of Change

  • Bug fix
  • New feature (additive params and outputs, Entra List User Memberships)

Testing

  • New regression tests, each red on the pre-fix code:
    • Outlook reply body shape
    • SharePoint upload traversal
    • AzDO WIQL link-query hydration
    • ADX byte-cap truncation and multi-table batch
  • vitest over every Microsoft tool, block, internal operation and webhook test file, plus blocks/blocks.test.ts: 428 passed
  • These checks pass: check-block-registry.ts origin/staging, check:tool-metadata, check:docs, check:integration-catalog, check:explicit-any, check:utils, check:test-patterns, check:unused-exports, and biome on the changed files. Type-check and the full check:audits run in CI.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 12, 2026 10:03pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The reviewed changes appear safe to merge.

Summary

This PR adds missing Microsoft inputs and outputs, fixes request shapes, and bounds large downloads and query results.

  • Teams messages show more details and can be read through chat or channel routes.
  • Outlook messages include more fields and reply actions send a Graph-ready body.
  • SharePoint list reads can filter items and uploads reject dot-segment paths.
  • OneDrive and Word results include more file ownership and location details.
  • Entra ID can list a user's direct or transitive memberships.
  • Dataverse record lists can page forward and updates can return the saved row.
  • Azure DevOps results include fuller work items and build continuation details.
  • Azure Data Explorer batch queries return more tables within a shared response budget.
  • Planner, Intune, Power BI, and Excel expose more documented result fields and read options.

Reviews (7) · Last reviewed commit: "fix(microsoft): shared toStringOrNull in..." · Reviewed by Greptile

Comment thread apps/sim/tools/sharepoint/get_list.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 187 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/tools/sharepoint/get_list.ts Resolved
Comment thread apps/sim/tools/microsoft_teams/utils.ts Resolved
Comment thread apps/sim/tools/azure_devops/utils.ts Resolved
Comment thread apps/sim/blocks/blocks/azure_devops.ts Resolved
Comment thread apps/sim/tools/intune/types.ts Resolved
Comment thread apps/sim/tools/microsoft_ad/get_user.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/blocks/blocks/sharepoint.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 187 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/blocks/blocks/microsoft_ad.ts Resolved
@waleedlatif1
waleedlatif1 force-pushed the fix/microsoft-suite-validation branch from 7c02efd to d52752b Compare November 12, 2026 20:52
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 187 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/blocks/blocks/sharepoint.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 187 files

Confidence score: 4/5

  • In get_message.ts, metadata.messages[0].sender can show Unknown for bot messages even when the top-level sender resolves the bot’s name. Align the metadata sender lookup with the top-level resolution.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/tools/microsoft_teams/get_message.ts">

<violation number="1" location="apps/sim/tools/microsoft_teams/get_message.ts:196">
P3: `metadata.messages[0].sender` still resolves only the user display name and falls back to `'Unknown'` for bot messages. The new top-level `sender` resolves application and device names too, so the same message reports two different senders. Reuse one resolved sender value in both places.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 187 files

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/blocks/blocks/sharepoint.ts Resolved
Comment thread apps/sim/tools/azure_devops/utils.ts Resolved
Comment thread apps/sim/blocks/blocks/azure_devops.ts Resolved
Comment thread apps/sim/tools/onedrive/utils.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/tools/azure_devops/utils.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 187 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/tools/azure_devops/utils.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 187 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

…s and expose missing params

Sweeps Outlook, Teams, OneDrive, Word, SharePoint, Excel, Planner, Intune,
Entra ID, Power BI, Dataverse, Dynamics 365, Azure DevOps, and Azure Data
Explorer against the Microsoft API references. Outlook read/search and the
Outlook trigger now return Bcc, Reply-To, internetMessageId, flags, and
categories. All changes are additive: no param, subBlock, operation, tool id,
or output is removed or retyped.
…ding, offboarding roles, SharePoint hidden filters
…look attachments, tighten SharePoint upload path
…when unexpanded, per-file SharePoint name errors
@waleedlatif1
waleedlatif1 force-pushed the fix/microsoft-suite-validation branch from 9a360b9 to 49a9cf0 Compare November 12, 2026 21:59
@waleedlatif1
waleedlatif1 merged commit 143fe02 into staging Nov 12, 2026
82 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/microsoft-suite-validation branch November 12, 2026 22:19
waleedlatif1 added a commit that referenced this pull request Nov 12, 2026
…and Microsoft sweeps

Final staging-to-main review of #9947, #9954 and #9949. The executor merges raw subBlock values
under the block mapper's output, so a value stored for another operation (or an empty default the
serializer fills in) reached tools whenever the mapper skipped that key.

- Outlook: reply, reply-all and forward always set cc/bcc, so a Send cc never reaches them; send
  and draft always set importance; the new Importance dropdown defaults to unset
- Google Groups Update Settings assigns every setting, so unchanged settings are never sent as ''
- Google Tasks List assigns its tri-state filters and the tool skips empty values
- OneDrive "If File Exists" defaults to unset so opening an old upload block sends nothing new
- Google Sheets clears a Batch Get major dimension for every other operation
- Azure DevOps: List Pipelines and Get Comments keep main's Max Results fallback, each paged
  operation has its own continuation token, and multi-item reads omit the raw field bag
- SharePoint upload drops "." folder segments as before and still rejects ".."
- Entra transitive and includeManager use one strict flag check; Dataverse treats a cleared page
  size as unset
- Behaviour-neutral cleanups: shared header lookup (Gmail), settings mapper (Groups), identity and
  metadata outputs (Word), isSet (Dataverse), graphPathSegment (SharePoint), typed identity reads
  (Azure DevOps), Teams fallback payload nulls
waleedlatif1 added a commit that referenced this pull request Nov 12, 2026
…and Microsoft sweeps (#9960)

* fix(integrations): close stale and empty value leaks from the Google and Microsoft sweeps

Final staging-to-main review of #9947, #9954 and #9949. The executor merges raw subBlock values
under the block mapper's output, so a value stored for another operation (or an empty default the
serializer fills in) reached tools whenever the mapper skipped that key.

- Outlook: reply, reply-all and forward always set cc/bcc, so a Send cc never reaches them; send
  and draft always set importance; the new Importance dropdown defaults to unset
- Google Groups Update Settings assigns every setting, so unchanged settings are never sent as ''
- Google Tasks List assigns its tri-state filters and the tool skips empty values
- OneDrive "If File Exists" defaults to unset so opening an old upload block sends nothing new
- Google Sheets clears a Batch Get major dimension for every other operation
- Azure DevOps: List Pipelines and Get Comments keep main's Max Results fallback, each paged
  operation has its own continuation token, and multi-item reads omit the raw field bag
- SharePoint upload drops "." folder segments as before and still rejects ".."
- Entra transitive and includeManager use one strict flag check; Dataverse treats a cleared page
  size as unset
- Behaviour-neutral cleanups: shared header lookup (Gmail), settings mapper (Groups), identity and
  metadata outputs (Word), isSet (Dataverse), graphPathSegment (SharePoint), typed identity reads
  (Azure DevOps), Teams fallback payload nulls

* fix(integrations): render Azure DevOps list outputs in docs, clear stale Outlook importance on replies

This branch was successfully deployed

1 active deployment
Preview — 49a9cf0b Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant