Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Authorization Header running da-repairs-oauth-validated #12

Open
lnmp4000 opened this issue Oct 28, 2024 · 0 comments
Open

No Authorization Header running da-repairs-oauth-validated #12

lnmp4000 opened this issue Oct 28, 2024 · 0 comments

Comments

@lnmp4000
Copy link

Hi,
I've been struggling to enable OAuth while calling my declarative agent through copilot. No matter what I try, the Authorization header is not present on the request when I debug the Azure function.

Initially I was using the Teams Toolkit to create a new Agent, and selecting the OAuth option when prompted.
I've now cloned this repo and deployed the samples/da-repairs-oauth-validated sample. The same issue still occurs, dropping a breakpoint on line 43 of repairs.ts

    const token = req.headers.get("Authorization")?.split(" ")[1];

reveals the token as undefined because there is no Authorization header.

If I tweak the OAuth registration in the Developer Portal from "Any Teams app" to reference the Existing Teams app (from the .env file)
image

I can get a prompt to "Sign in to Repairs-OAuthdev" but that button does nothing. When I ask copilot, it confirms I am already singed in.

image
image

I'm struggling to know what to try next, so any suggestions would be gratefully received.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant