calcom/cal.diy · critical · Error
Delegation credentials are not available in the community…
Error message
Delegation credentials are not available in the community edition
What it means
Thrown unconditionally by assertSuccessfullyConfiguredInWorkspace in the community-edition stub of delegationCredential.ts. The community build ships no-op stubs for every delegation-credential function; this one cannot no-op (it must assert configuration) so it always throws, signaling the feature is enterprise-only.
Solutions
- If you need delegation credentials, run the enterprise edition or acquire an EE license.
- If you are building a feature, gate the UI/API that calls assertSuccessfullyConfiguredInWorkspace behind an EE check so community users never reach it.
- If this is unexpected in EE, verify the correct (EE) implementation of delegationCredential.ts is being resolved by the module system instead of this community stub.
Example fix
// before - community stub always throws
export async function assertSuccessfullyConfiguredInWorkspace(_args) {
throw new Error("Delegation credentials are not available in the community edition");
}
// after - guard caller so the stub is never reached in community
if (!isEnterprise()) {
throw new TRPCError({ code: "FORBIDDEN", message: "Delegation credentials require Cal.com Enterprise." });
}
await assertSuccessfullyConfiguredInWorkspace({ delegationCredential, user }); Defensive patterns
Strategy: type-guard
Validate before calling
import { isEnterprise } from "@calcom/ee/lib/isEnterprise";
if (!isEnterprise()) {
throw new TRPCError({ code: "FORBIDDEN", message: "Delegation credentials require Cal.com Enterprise." });
} Type guard
const supportsDelegationCredentials = (): boolean => {
// community stub throws; EE does not. Feature-flag this at the UI layer.
try { return typeof process.env.CALCOM_LICENSE !== "undefined"; } catch { return false; }
} Try / catch
try {
await assertSuccessfullyConfiguredInWorkspace({ delegationCredential, user });
} catch (err) {
if (err instanceof Error && /community edition/i.test(err.message)) {
res.status(403).json({ error: "This feature requires Cal.com Enterprise." });
return;
}
throw err;
} Prevention
- Gate delegation-credential UI behind an enterprise feature flag.
- Document which routes are enterprise-only so community users never reach the stub.
- In EE, verify the correct (non-stub) delegationCredential module resolves.
When it happens
Trigger: Any code path in community edition that calls assertSuccessfullyConfiguredInWorkspace({ delegationCredential, user }) — typically the workspace/org calendar delegation setup flow.
Common situations: Running Cal.com community edition and trying to configure Google Workspace Calendar delegation or Microsoft Graph calendar delegation for an organization; calling an EE-only API surface from community code.
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/2e181c9fedc7a529.
Report an issue: GitHub.
Appendix: source
Thrown at packages/app-store/delegationCredential.ts:31
}) {
return [] as CredentialForCalendarService[];
}
export async function getAllDelegationCredentialsForUser(_args: { user: { email: string; id: number } }) {
return [] as CredentialForCalendarService[];
}
export async function getAllDelegatedCalendarCredentialsForUser(_args: {
user: { email: string; id: number };
}) {
return [] as CredentialForCalendarService[];
}
export async function assertSuccessfullyConfiguredInWorkspace(_args: {
delegationCredential: unknown;
user: unknown;
}): Promise<void> {
throw new Error("Delegation credentials are not available in the community edition");
}
export async function getAllDelegationCredentialsForUserByAppType(_args: {
user: { email: string; id: number };
appType: string;
}) {
return [] as CredentialForCalendarService[];
}
export async function getAllDelegationCredentialsForUserByAppSlug(_args: {
user: { email: string; id: number };
appSlug: string;
}) {
return [] as CredentialForCalendarService[];
}
export const buildAllCredentials = ({
existingCredentials,View on GitHub (pinned to 176037d0af)