Skip to content

Commit 3d73acb

Browse files
Updated README for Troubleshooting steps for OBO and grant user access (#493)
Updated README for Troubleshooting steps for OBO and grant user access
1 parent 9f4e7ef commit 3d73acb

File tree

9 files changed

+77
-4
lines changed

9 files changed

+77
-4
lines changed

conversational-agent-app/README.md

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Conversational Agent App"
3-
language: python
4-
author: "Vivian Xie"
3+
language: Python
4+
author: "Vivian(Wenwen) Xie"
55
date: 2025-06-09
66
---
77

@@ -36,6 +36,7 @@ The Databricks Genie Conversation APIs (in Public Preview) enable you to embed A
3636
- **Workspace Integration**: Access your data assets and models directly from your Databricks workspace
3737
- **Natural Language Data Queries**: Ask questions about your data in plain English
3838
- **Stateful Conversations**: Maintain context for follow-up questions
39+
- **OBO(On-Behalf-Of) Authentication**: User credentials passthrough for fine-grained access control.
3940

4041
## Example Use Case
4142

@@ -69,8 +70,80 @@ For detailed instructions on configuring resources, refer to the [official Datab
6970
For more details, refer to the [official Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/deploy).
7071

7172
## Troubleshooting
72-
73-
For troubleshooting, navigate to the Monitoring page of the selected genie space and check if the query has been sent successfully to the genie room via the API.
73+
1. After you install the app from Markeplace, check the Authorization page for API scope details.
74+
![](./assets/genie-space12.png)
75+
76+
Then you open the url link the first time, ensure that you see this OBO scope authorization page, which has all four scopes:
77+
- serving.serving-endpoints
78+
- dashboards.genie
79+
- files.files
80+
- sql
81+
82+
![](./assets/genie-space10.png)
83+
84+
85+
2. If you directly clone the git repo, start an app instance and try to add scope, notice that serving.serving-endpoints is not in the scope list yet in the UI, which is a work-in-progress and will get added later.
86+
![](./assets/genie-space13.png)
87+
88+
What you need to do is using Databricks API or CLI to manually grant the user serving.serving-endpoints.
89+
To do this, you can use either the [CLI](https://docs.databricks.com/aws/en/dev-tools/cli), [SDK](https://docs.databricks.com/aws/en/dev-tools/sdk-python) or [API](https://docs.databricks.com/api/account/customappintegration/get) as an Account Admin. To show an example using CLI:
90+
- Take the Oauth2 App client ID:
91+
92+
![](./assets/genie-space14.png)
93+
94+
- Pass this to the Databricks CLI command,
95+
96+
```
97+
databricks account custom-app-integration get '12345667-1234-5678-a85d-eac774235aea'
98+
99+
{
100+
"client_id":"12345667-1234-5678-a85d-eac774235aea",
101+
"confidential":true,
102+
"create_time":"2025-02-18T09:59:07.876Z",
103+
"created_by":4377920341700116,
104+
"integration_id":"abcdefgg-1234-5678-a85d-eac774235aea",
105+
"name":"app-abcdeft 1234xp",
106+
"redirect_urls": [
107+
"http://localhost:7070",
108+
"https://mzeni-obo-app-url.azure.databricksapps.com/.auth/callback"
109+
],
110+
"scopes": [
111+
"openid",
112+
"profile",
113+
"email",
114+
"all-apis",
115+
"offline_access"
116+
],
117+
"token_access_policy": {
118+
"access_token_ttl_in_minutes":60,
119+
"refresh_token_ttl_in_minutes":10080
120+
}
121+
}
122+
```
123+
- Update the scopes with below command line, notice you will copy all the original scopes over and add the serving-endpoints at the end:
124+
```
125+
databricks account custom-app-integration update '65d90ec2-54ba-4fcb-a85d-eac774235aea' --json '{"scopes": ["openid", "profile", "email", "all-apis", "offline_access", "serving.serving-endpoints"]}'
126+
```
127+
128+
- If it doesn't reflect in the app, clear the cookie in the browser developer tools, and you may need to recreate the app or reinstall. You can also try opening the url in incognito mode.
129+
130+
![](./assets/genie-space16.png)
131+
132+
133+
3. Make sure the users have proper access to the underlying resources:
134+
- For querying tables, users need at least `USE CATALOG` permissions on the Unity catalog and `USE SCHEMA` on the schema, `SELECT` permission on the table
135+
- For genie space, users need at least `Can Run` permission
136+
- For SQL warehouse, users need at least `Can use` permission
137+
- For model serving endpoint, users need at least `Can Query` permission
138+
139+
4. When you share the app as the app owner with other users, they will see the app owner under Permission Requested and Sign-in user are different, which means the app owner is authoring other users to access the app
140+
![](./assets/genie-space17.png)
141+
142+
The app owner needs to grant other users `Can Use` permission for the app itself, along with the access to the underlying Datarbricks resources.
143+
144+
![](./assets/genie-space18.png)
145+
146+
5. For further troubleshooting, navigate to the Monitoring page of the selected genie space and check if the query has been sent successfully to the genie room via the API.
74147

75148
![](./assets/troubleshooting1.png)
76149

Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)