Skip to content

Issue with broken token endpoint link when calling Copilot Studio Agent from JavaScript #327

@Aravinda-Sringarapuram

Description

@Aravinda-Sringarapuram

I am using the sample code (path: SSOSamples/SSOwithEntraID) to implement SSO login for a Copilot Studio agent, which is being called from an HTML page using MSAL in JavaScript . However, the API links for the token endpoint and conversation endpoint appear to be broken. Any help would be greatly appreciated.

These links were obtained from the AI agent's channel options in Copilot Studio. Here are the links: https://default{TenantId}.{Integer}.environment.api.powerplatform.com/copilotstudio/dataverse-backed/authenticated/bots/{cre...}/token?api-version=2022-03-01-preview

Please see the screenshot attached. Replace client id with Azure tenant ID. It shows result/response for conversation endpoint. I am getting same response for token endpoint.

Error Message: Invoke-WebRequest : The remote server returned an error: (404) Not Found. At line:1 char:1 + Invoke-WebRequest -UseBasicParsing -Uri "defaultexxxxxxx ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc eption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions