static withUserPrompt()

in packages/azure-kusto-data/src/connectionBuilder.ts [158:180]


    static withUserPrompt(
        connectionString: string,
        options?: InteractiveBrowserCredentialNodeOptions | InteractiveBrowserCredentialInBrowserOptions,
        timeoutMs?: number,
    ): KustoConnectionStringBuilder {
        const kcsb = new KustoConnectionStringBuilder(connectionString);
        const { tenantId, clientId } = (options as InteractiveBrowserCredentialNodeOptions) || {};
        if (clientId) {
            throw new Error("clientId should be empty as it is retrived from the service management endpoint");
        }

        kcsb.aadFederatedSecurity = true;
        kcsb.useUserPromptAuth = true;
        if (tenantId) {
            kcsb.authorityId = tenantId;
        } else if (options) {
            options.tenantId = kcsb.authorityId;
        }

        kcsb.timeoutMs = timeoutMs;

        return kcsb;
    }