microsoft / microsoft/CopilotStudioSamples
Issue: 403 Error in Bot Configuration
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 797
- Forks
- 491
- PR merge metrics
- No merged PRs in 30d
Description
Good Morning,
I'm having an issue trying to set up a custom Copilot by following the tutorial: https://learn.microsoft.com/en-us/microsoft-copilot-studio/configure-sso?tabs=classic
Single-Sign On is definitely working on the custom site which I've developed but then I'm experiencing a 403 error when trying to make actual use of the Copilot bot, so that the custom website looks like the below:
Below is the error as displayed in devtools (I've put it as an image and as a JSON code block):
t
message
:
"ajax error 403"
request
: {
async: true,
crossDomain: false,
withCredentials: false,
headers: {
…},
createXHR: ƒ,
…
}
response
:
error:
code:
"RegionNotAllowed"
message
:
"The request received in unitedkingdom but target regional bot belongs to europe. Please check BaseURI https://docs.microsoft.com/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-api-reference?view=azure-bot-service-4.0#base-uri." [
[Prototype]
]:
Object[[Prototype]]:
Object
responseType
:
"json"
status
:
403
xhr
:
XMLHttpRequest {
readyState: 4,
timeout: 20000,
withCredentials: false,
upload: XMLHttpRequestUpload,
onreadystatechange: ƒ,
…
}
[
[Prototype]
]:
Error
I am using the HTML code of the custom website from this repo, and I tried editing the code to force the domain to be Europe and thus avoid the error above stating that the request is coming from the UK, but this doesn't seem to have done anything. Below is the change that I made to the code from this CopilotStudioSamples repository:
Can you please help me figure out what is causing this issue preventing the custom website from working?
Please excuse my lack of knowledge about web design, I'm just a humble Power Platform developer and this is all very new to me.
Thanks,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the custom website HTML from the CopilotStudioSamples repository and the Direct Line BaseURI reference linked in the report. Compare the endpoint used by the site with the Copilot's regional configuration, then verify that bot requests no longer return the RegionNotAllowed 403 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, html
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100