
I Tried Distributing Snowflake's CoCo for Excel Across My Organization via the Microsoft 365 Admin Center
This page has been translated by machine translation. View original
Introduction
CoCo for Microsoft Excel, which lets you use Snowflake's CoCo as an Excel add-in, is available in preview.
It displays a chat pane next to an Excel workbook and lets you retrieve Snowflake data using natural language or SQL. You can also ask the pane to create pivots and charts. In the current preview stage, it is not listed on Microsoft Marketplace, so you need to deploy it as a custom add-in from the manifest. There are two deployment options: "sideloading," where users register it manually on their own PC, and "organizational distribution," where a Microsoft 365 administrator distributes it from the admin center.
In this article, I will try deploying it through organizational distribution from the Microsoft 365 admin center and connecting to Snowflake in Excel for the web.
CoCo for Microsoft Excel
This feature is described in the following documentation.
The main features are as follows.
- Works as an add-in for Excel for Microsoft 365 (Windows, Mac, Web)
- Queries are executed with the user's own Snowflake role. Access control, masking policies, and row access policies are applied
- A preview is displayed before writing to the workbook. You can approve or reject it
- You can use commands such as
/catalog(retrieve data),/pivot(a live pivot aggregated on the Snowflake side), and/refresh, as well as theCORTEXfunction in cells - Billing is based on token consumption. Live pivots and data refreshes also consume a warehouse
For an overview of the feature, please also refer to the following.
How authentication works
Snowflake OAuth is used for authentication. An administrator creates one custom OAuth security integration in the account and shares its client ID with users.
Users enter the account identifier and client ID in the pane and sign in to Snowflake in the browser. When they paste the displayed sign-in code into the pane, the connection is complete.
Deployment patterns
In the current preview stage, CoCo for Microsoft Excel is not listed on Microsoft Marketplace. Therefore, you need to deploy it as a custom add-in from the manifest. The documentation states that it is planned to be offered on Microsoft Marketplace in a stage after the preview.
The ways to add it as a custom add-in are as follows.
| Method | Who registers | Unit | Admin privileges | Reflection | Suited for |
|---|---|---|---|---|---|
| Sideloading | User, or IT staff | One PC (one person) at a time | Not required (for the Windows registry method) | Immediate | Small-scale trials |
| Organizational distribution | Microsoft 365 administrator | In bulk by user/group | Required | Up to 72 hours (per the documentation) | When increasing the number of users |
| Microsoft Marketplace | - | - | - | - | Not listed at present (planned after the preview stage) |
With organizational distribution, once an administrator deploys it, the add-in automatically appears in the Excel of the target users. No per-user installation is needed. On the user side, they only need to enter the connection information and sign in.
Note that if you register via both sideloading and organizational distribution, the same add-in will be registered twice, so choose only one.
Trying it out
Prerequisites
I used the following environment.
- Snowflake: An account with Cortex and CoCo enabled
- Microsoft 365: A tenant for testing
- Microsoft 365 Business Standard trial
- A user with an administrator role that can deploy add-ins in the admin center
- Excel: Excel for the web
Create an OAuth security integration on the Snowflake side
Create the integration object with ACCOUNTADMIN or a role that has the global CREATE INTEGRATION privilege.
USE ROLE ACCOUNTADMIN;
CREATE SECURITY INTEGRATION IF NOT EXISTS coco_excel_oauth
TYPE = OAUTH
OAUTH_CLIENT = CUSTOM
OAUTH_CLIENT_TYPE = 'PUBLIC'
OAUTH_REDIRECT_URI = 'https://ai.snowflake.com/static/excel/oauth/callback.html'
OAUTH_ENFORCE_PKCE = TRUE
OAUTH_ISSUE_REFRESH_TOKENS = TRUE
OAUTH_REFRESH_TOKEN_VALIDITY = 86400
ENABLED = TRUE
COMMENT = 'Snowflake CoCo for Microsoft Excel add-in';
The redirect URI must match exactly. If the trailing slash or the host differs, sign-in will fail.
After creating it, retrieve the client ID.
SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('COCO_EXCEL_OAUTH');
The result includes OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, and so on. Since this is a public client, the secret is not used. What you share with users is the value of OAUTH_CLIENT_ID.
Note that by default ACCOUNTADMIN, ORGADMIN, GLOBALORGADMIN, and SECURITYADMIN cannot authenticate with OAuth, so use a non-privileged role for sign-in.
Deploy the add-in from the admin center
Sign in to the Microsoft 365 admin center (admin.microsoft.com) as an administrator and proceed in the following order.
Open "Settings > Integrated apps" and select "Upload custom apps."

Set the app type to "Office Add-in using an XML manifest" and specify the following manifest URL.
https://ai.snowflake.com/static/excel/releases/prod/manifest.xml

Proceed to the next step and add users. I chose "Just me" for now.

Proceed to the next step and accept the permission request.

Select "Finish deployment."


After deployment, I could also confirm it in the app list.

According to the documentation, it can take up to 72 hours after deployment to be reflected. This time, when I checked about 2 hours later, it had been reflected for the target user.
Sign in with Excel for the web
After it was reflected, when I opened Excel for the web as the target user, "Snowflake CoCo" was displayed.

You can see that it has also been added to the add-ins.

When you select it, a pane opens on the right, so specify the following items.
- Account identifier:
<organization>-<account> - OAuth client ID
- Role (optional. If left blank, the default role is used)

When you select "Sign in with Snowflake," a sign-in screen opens in the browser. After signing in with your Snowflake credentials, a sign-in code is displayed.



Copy the code, paste it into "Paste your sign-in code" in the pane, and select "Finish sign-in." The code is single-use and expires in about 1 minute.

When sign-in is complete, a screen for selecting a workspace is displayed.

Retrieve data
Let's make the following request in the pane.
PRD_DB.PRD.CUSTOMER_ORDERSを参照して
Before writing, a preview is displayed (create_table, CocoTable_CustomerOrders, Sheet1!A1:E101).

When I selected "Accept," the table was written out to Excel.

Deploy to another user
Next, let's widen the distribution target. First, when I opened Excel as a regular user who was not a target, the add-in was not displayed at this point.

In the admin center, edit the add-in's "Assigned users," add the test user, and update.



After it was reflected, the add-in had been added for the target regular user as well.

This was a user with SSO configured, but they were able to sign in without any problems.

Conclusion
I deployed CoCo for Microsoft Excel through organizational distribution from the Microsoft 365 admin center and retrieved data from Excel.
With organizational distribution, once an administrator deploys it, no installation work is needed on the user side. I felt it is easier to operate than sideloading when the number of users grows.
I hope this is helpful to someone.