Connect an assistant, verify its workspace, and revoke access
After setting up your workspace, connect an OAuth-compatible assistant without handing it your password or a long-lived workspace API credential. This lesson follows one complete authorization lifecycle: initiate the connection, inspect consent, approve it, verify workspace identity, revoke the grant, and prove that the old token is denied.
Connect an assistant, verify its workspace, and revoke access
Loading video…
The video uses a small reference client, not a particular commercial assistant's settings screen. It sends real OAuth and MCP requests to QScan. The QScan consent page, account page, HTTP 200 identity result and HTTP 401 after revocation are real. No remote service is mocked. The reference client holds its access token in local server memory; the recording never displays the token. It starts no scans and leaves no active grant behind.
Get ready
Use an isolated workspace for your first connection. Sign in through your normal authentication flow, including MFA if enabled. Choose an account whose workspace role matches the assistant's intended job; use a viewer for inspection-only work where appropriate. The recording uses the isolated acceptance administrator and explicitly shows the inherited role. OAuth consent does not make an administrator token read-only.
Your client must support the hosted MCP endpoint, OAuth authorization-code flow and PKCE. Client setup screens vary. The reference client makes the protocol sequence visible; it is not an installation package or a claim that every assistant supports this endpoint.
Initiate from the client
- In your OAuth-capable client's MCP connection settings, enter
https://qscan.dev/mcp. - Choose its connect or authorize action. In the recording this is Connect with OAuth.
- Let the client open the QScan authorization page. Do not paste an authorization code or access token into an unrelated page.
- If asked to sign in, complete normal authentication. Do not disable MFA for this workflow.
The client supplies a random state value and an S256 proof-key challenge. It validates the returned state and exchanges the authorization code with its matching verifier. Those protocol checks are performed by the reference client, not by manually editing the address bar.
Review consent before approving
- Confirm that you initiated this request and recognize the client name. A client-provided name is not a verification badge.
- Review the selected workspace and your inherited role. Do not assume your most recently visited workspace is selected.
- Review return-address details and compare them with the client you initiated. The recording's callback is its own temporary loopback server.
- Cancel an unexpected request. If the account has excessive permissions for the job, cancel and use the appropriate account instead.
- Choose Allow only after checking the intended boundary.
The client exchanges the returned code for a token. The recording keeps the code, verifier and token out of the interface and logs. A successful exchange proves authorization, not the correctness of any later scan request.
Check identity before invoking other tools
- Choose Read workspace identity, which invokes the real
workspace_identityMCP tool. - Confirm the successful HTTP response and the exact organization identifier and name.
- If the workspace is wrong, stop and revoke the connection before requesting other tools.
- Only then use tools appropriate to the granted role and intended task.
This lesson deliberately stops at a read-only identity request. It does not demonstrate all MCP tools, a database scan through MCP, or a particular third-party assistant's execution policies. Tool calls remain subject to workspace authorization; a client connection is not permission to cross tenant boundaries.
Revoke and prove the old token no longer works
- Open Account and security, then Assistant connections.
- Find the intended client. Check its name and grant details before revoking it.
- Choose Revoke for that connection.
- Return to the reference client and repeat the identity request using the same token.
- Confirm HTTP 401. The client must not silently obtain a new token for this revocation check.
The video records both the removed grant and the denied request. Revocation does not undo previous mutations, erase evidence, or automatically cancel work that was already submitted. Inspect outstanding jobs separately. Workspace API credentials are managed separately from assistant grants.
Recover from common problems
- The client cannot start OAuth: confirm its hosted MCP and authorization-code/PKCE support, the exact endpoint, and its documented callback configuration. Do not replace OAuth with a password embedded in a URL.
- Consent shows the wrong workspace or role: cancel. Correct the account or workspace choice and restart from the client.
- The callback or exchange fails: check the registered return address, state validation, verifier and resource identifier. Start a new authorization rather than reusing a consumed code.
- Identity returns 401 before intentional revocation: inspect expiry and grant state, then reauthorize through the client when appropriate. Do not log the token while diagnosing it.
- A tool returns a permission error: review the account's actual workspace role. Successful authentication does not grant every operation.
- The client still appears to work after revocation: confirm it used the same grant and did not reauthorize automatically. Review Assistant connections again and identify any separate grants.
What you accomplished
You initiated an OAuth connection, checked the workspace boundary, made a real MCP identity request, revoked the grant, and verified denial with the old token. Apply that same lifecycle to your chosen compatible assistant, then consult the AI integration guide for the operations you intend to use.
Narration transcript
Let's connect an assistant safely. After workspace setup, this lesson shows OAuth consent, an identity check, and revocation, using a real reference client.
Before approving, check the client name and selected workspace. This connection inherits your role. Use an account with only the permissions your assistant needs.
Approve the connection. The client exchanges its code securely.
Now read workspace identity. The response confirms which organization this token can access, before we ask for any other tools.
Back in your account, open Assistant connections. Find this client and revoke its access when you're finished.
Try the same request again. HTTP four oh one confirms the old token no longer grants access.
You've connected, verified the workspace, and revoked access. Use that same sequence when connecting your own OAuth-compatible assistant.