Skip to content

Add microsoft-365 domain skill#371

Open
cipher982 wants to merge 2 commits into
browser-use:mainfrom
cipher982:add-microsoft-365-domain-skill
Open

Add microsoft-365 domain skill#371
cipher982 wants to merge 2 commits into
browser-use:mainfrom
cipher982:add-microsoft-365-domain-skill

Conversation

@cipher982

@cipher982 cipher982 commented May 17, 2026

Copy link
Copy Markdown

Summary

  • Add Microsoft 365 domain skill covering SharePoint search, auth-cookie sync, and Loop viewer extraction.
  • Document the raw .loop download trap and ServerRedirectedURL navigation path.

Validation

  • Verified against a logged-in M365 tenant: SharePoint search returns rows, Loop viewer extracts decision text.

Summary by cubic

Adds Microsoft 365 domain skill docs for SharePoint Online and Loop to help agents authenticate, search, and read Loop docs without download traps. Adds a browser harness domain assertion to fail fast when the active tab is on the wrong domain.

  • New Features
    • Auth cookie sync across Entra alias hosts with modern CDP fields to preserve.
    • SharePoint search via /_api/search/query from a same-origin tab; use ServerRedirectedURL for navigation.
    • Loop docs: avoid raw .loop links; use loop.cloud.microsoft viewer and simple text extraction.
    • Fast checks: auth-redirect probe and assert_page_domain to validate cookies and target site before actions.

Written for commit 19a6ffa. Summary will update on new commits.

Review in cubic

Captures hard-won knowledge for agents working with Microsoft 365:

- Full Entra cookie host list including login.microsoft.com and
  login.windows.net aliases (missing either causes silent re-auth)
- Modern CDP CookieParam fields agents should forward when syncing auth
  (partitionKey object form, sourceScheme, sourcePort, priority)
- SharePoint REST /_api/search/query — the SELECT_PROPERTIES list and
  how to call it from a same-origin tab
- The raw .loop file download trap (binary Fluid container; navigating
  triggers a download modal) and the working ServerRedirectedURL
  Loop-viewer DOM extraction path
- Auth-redirect probe pattern: cookies-on-disk != working auth
- Session timeout shapes (ESTSAUTH/ESTSAUTHPERSISTENT KMSI 24h vs 90d)
@cipher982 cipher982 marked this pull request as ready for review May 17, 2026 22:48

@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 1 file

Re-trigger cubic

@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 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/browser_harness/helpers.py">

<violation number="1" location="src/browser_harness/helpers.py:190">
P1: `assert_page_domain` passes when both `expected_domain` and `host` are empty, so a falsy/unset expected value combined with a hostless page (e.g. `about:blank`) silently succeeds instead of failing closed.</violation>
</file>

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

Fix all with cubic | Re-trigger cubic

raise RuntimeError(f"assert_page_domain: page has pending dialog: {info['dialog']}")
host = (urlparse(info.get("url") or "").hostname or "").lower()
expected = (expected_domain or "").removeprefix("*.").removeprefix(".").lower()
ok = host == expected or (allow_subdomains and host.endswith(f".{expected}"))

@cubic-dev-ai cubic-dev-ai Bot Jun 28, 2026

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.

P1: assert_page_domain passes when both expected_domain and host are empty, so a falsy/unset expected value combined with a hostless page (e.g. about:blank) silently succeeds instead of failing closed.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/browser_harness/helpers.py, line 190:

<comment>`assert_page_domain` passes when both `expected_domain` and `host` are empty, so a falsy/unset expected value combined with a hostless page (e.g. `about:blank`) silently succeeds instead of failing closed.</comment>

<file context>
@@ -175,6 +175,28 @@ def page_info():
+        raise RuntimeError(f"assert_page_domain: page has pending dialog: {info['dialog']}")
+    host = (urlparse(info.get("url") or "").hostname or "").lower()
+    expected = (expected_domain or "").removeprefix("*.").removeprefix(".").lower()
+    ok = host == expected or (allow_subdomains and host.endswith(f".{expected}"))
+    if not ok:
+        raise RuntimeError(
</file context>
Fix with cubic

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