Budibase/budibase · error · HTTPError
SharePoint requires an OAuth2 client credentials auth config
Error message
SharePoint requires an OAuth2 client credentials auth config.
What it means
Error "SharePoint requires an OAuth2 client credentials auth config." thrown in Budibase/budibase.
Source
Thrown at packages/server/src/sdk/workspace/ai/knowledgeSources/sharepoint/connection.ts:178
const readConnection = async (
datasourceId: string,
authConfigId: string
): Promise<OAuth2RestAuthConfigWithTokenCache> => {
let datasource: Datasource
try {
datasource = await sdk.datasources.get(datasourceId)
} catch {
throw new HTTPError("SharePoint auth config not found.", 400)
}
const authConfigs = datasource.config?.authConfigs as
| OAuth2RestAuthConfigWithTokenCache[]
| undefined
const authConfig = authConfigs?.find(config => config._id === authConfigId)
if (!authConfig) {
throw new HTTPError("SharePoint auth config not found.", 400)
}
if (!isOAuth2ClientCredentialsAuthConfig(authConfig)) {
throw new HTTPError(
"SharePoint requires an OAuth2 client credentials auth config.",
400
)
}
if (!authConfig.url || !authConfig.clientId) {
throw new HTTPError(
"OAuth2 auth config is missing token URL or client ID.",
400
)
}
return authConfig
}
export const getSharePointBearerToken = async (
datasourceId: string,
authConfigId: string
): Promise<string> => {
const connection = await readConnection(datasourceId, authConfigId)View on GitHub (pinned to a81a902e9a)
When it happens
Trigger: Thrown at packages/server/src/sdk/workspace/ai/knowledgeSources/sharepoint/connection.ts:178 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/96d7c2630afdd8c2.
Report an issue: GitHub.