-
Notifications
You must be signed in to change notification settings - Fork 203
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
Issue with OAuth2 Redirection During Sign-In on Copilot Declarative Agent with API Plugin #12949
Comments
👋 Hi @swamisnawale, Thanks for reaching out! We value your feedback and will do our best to address your issue promptly. Sometimes, we may need to investigate further, but we'll usually get back to you within 2 days with an update. Please stay tuned. This is an automated response from our GitHub App. Here's the AI-generated message: Based on your query and the provided information, it seems that you're experiencing an issue with the OAuth2 redirection during the sign-in process for your custom Copilot agent using the Teams Toolkit. Here are the steps and suggestions to troubleshoot and potentially resolve this issue: Error Details
Potential Causes and Solutions1. OAuth2 Redirect URI Issues
2. App Registration and Permissions
3. Network and Browser Issues
4. Debugging Authentication Flow
5. Backend Configuration
Additional Resources
function getTokenInTeams() {
app.getContext().then((ctx) => {
if (ctx) {
console.log(ctx);
authentication.authenticate({
url: window.location.origin + ".auth/login/aad/callback",
width: 600,
height: 535,
})
.then(
(result) => {
console.log("Got a result", result);
// Add notifySuccess here
authentication.notifySuccess();
},
(err) => {
if (err.message == "FailedToOpenWindow") {
console.log("Error Message: FailedToOpenWindow");
} else {
console.log("Error Message: " + err.message);
}
}
);
}
});
} If the problem persists, consider reaching out to Microsoft support or the Teams Toolkit community for further assistance. Note: This message was generated automatically by an AI-powered system. |
@swamisnawale - Thank you for bringing this issue to our attention. We will look into it and get back to you shortly. |
I have the same problem. |
hi, @swamisnawale and @matteoperazzolo , for Declarative Agent with Microsoft Entra OAuth action, the Microsoft Entra app needs to add identify URI follow specific pattern: You can find this identify URI from teams developer portal |
@SLdragon Thanks for your reply, I will try this out. Just a quick question, is this something that newly added? because earlier this was not setup and yet the agent was working without any issue. |
@swamisnawale , yes, this is a new requirement to use Declarative Agent for Microsoft Entra OAuth. Previously, it was not required, so your agent was working correctly |
Hi @SLdragon, is there a full documentation yet where to add the SSO registration in the app manifest yet? I have the same issue. |
@claraschneiker , I followed the steps that @SLdragon given to setup the SSO Registrations, and the agent has been working properly. |
Currently, there is no official documentation on where to add the SSO registration in the app manifest. However, it will be available in the future. In the meantime, if you create a "from scratch" DA template with Entra SSO in TTK, it will automatically handle it for you |
Close this issue, and if you need additional help, feel free to reopen it or create a new issue |
What I am doing
I am creating a custom Copilot agent with API plugin calls to the Microsoft Graph API /me and /users endpoints to retrieve user details. For authentication, I am using OAuth as the security schema defined in my Open API description file.
What I did so far
Expected behavior
When I click "Sign In", it should open a popup for login. After entering the credentials, the popup should close.
Issue I am facing
When I click "Sign In", the popup opens but freezes, showing nothing. This issue suddenly started occurring, even though it was working fine yesterday. I have also tested this with multiple users.
Screenshots
The text was updated successfully, but these errors were encountered: