Azure Databricks Enterprise Application User Impersonation Token Group Claims Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2024 09:08 AM - edited 09-26-2024 09:10 AM
Hi all,
export const getDatabricksToken = async () => {
const account = msalInstance.getActiveAccount();
const response = await msalInstance.acquireTokenSilent({
scopes: ["2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/user_impersonation"],
account: account,
})
return response.accessToken
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 11:14 AM
Hi, did you find an answer for it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 09:39 PM
I got in touch with Microsoft support and they mentioned it is not possible as the Azure Databricks app registration is managed by Databricks and changing the manifest to exclude group claims on that application is not possible and it impacts all users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 11:55 AM
Hi @ahsan_aj,
You can modify your token request by adding a claims parameter
const claimsRequest = {
"access_token": {
"groups": null
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 09:39 PM
Let me try this and get back to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 09:54 PM
I tried it like this, however it still adds group claims in the access token:
export const getDatabricksToken = async () => {
const account = msalInstance.getActiveAccount();
const response = await msalInstance.acquireTokenSilent({
scopes: ["2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/user_impersonation"],
account: account,
claims: JSON.stringify({
"access_token": {
"groups": null
}
})
})
return response.accessToken
};

