Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import { getMcpPlatformAuthenticationScope } from './environment-utils';
export class AgenticAuthenticationService {
public static async GetAgenticUserToken(authorization: Authorization, turnContext: TurnContext) {
const scope = getMcpPlatformAuthenticationScope();
return (await authorization.exchangeToken(turnContext, 'agentic', { scopes: [scope] })).token || '';
return (await authorization.exchangeToken(turnContext, 'agentic', { scopes: scope })).token || '';
}
}
4 changes: 2 additions & 2 deletions packages/agents-a365-runtime/src/environment-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ export function isDevelopmentEnvironment(): boolean {
*
* @returns The MCP platform authentication scope from MCP_PLATFORM_AUTHENTICATION_SCOPE env var, defaults to production scope.
*/
export function getMcpPlatformAuthenticationScope(): string {
return process.env.MCP_PLATFORM_AUTHENTICATION_SCOPE || PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE;
export function getMcpPlatformAuthenticationScope(): string[] {
return [process.env.MCP_PLATFORM_AUTHENTICATION_SCOPE || PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE];
}
Loading