[Cortana] SignCard doesn't work with Cortana, but fine with skype
System Information (Required)
- SDK Language: C#
- SDK Version: Bot Builder 3.8
- Development Environment:
Issue Description
My connection button inside the sign-in card disappears when works with Cortana, but Skype is fine.
Code Example
var message = activity.CreateReply();
message.Speak = "This is a Sign-in card";
message.Summary = "This is a Sign-in card";
message.Text = "Message Text";
message.Attachments = new List<Attachment>(){
new SigninCard("You need to authorize me", new List<CardAction>()
{
new CardAction()
{
Value = "https://xxxbot.xxxx.com.tw:8443/account/Login?id="+System.Web.HttpUtility.UrlEncode(activity.From.Id),
Type = "signin",
Title = "Connect"
}
}).ToAttachment()
};
await connector.Conversations.SendToConversationAsync(message);
Steps to Reproduce
- invoke cortana skill
- Appear sign-in card without connection button
Actual Results
failed with cirtana

Successed with skype

When using a SignIn card on Cortana, you need to add the 'redirect_uri' query string parameter. https://docs.microsoft.com/en-us/cortana/tutorials/bot-skills/bot-skill-auth
I added &redirect_uri=http://bing.com/agents/oauth' to my SignIn Card and it works perfectly. I am not using the redirect uri value in my OAuth login flow, but just adding it to the URL is enough to get the card working in Cortana.
Here's a code example for sign-in card for .NET SDK which shows how to configure the URL with redirect_uri parameter:
var message = context.MakeMessage() as IMessageActivity;
message.Speak = "This is a Sign-in card";
message.Summary = "This is a Sign-in card";
message.Text = "Message Text";
message.Attachments = new List<Attachment>(){
new SigninCard("You need to authorize me", new List<CardAction>()
{
new CardAction()
{
Value = "https://login.microsoftonline.com/?redirect_uri=http%3a%2f%2fbing.com%2fagents%2foauth",
Type = "signin",
Title = "Connect"
}
}).ToAttachment()
};
await context.PostAsync(message);
I also had the problem.
I already set the redirect_uri in my OAuth URL, such as:
https://accounts.google.com/o/oauth2/v2/auth?client_id=xxx&redirect_uri=http%3a%2f%2azurewebsites.net/%2fapi%2fOAuthCallback
But Cortana still can't display Sign-in Card.
I don't know what happened. Please help me, thank you.
I try the more sample, such as SimpleFacebookAuthBot , then the Cortana still doesn't display action button. Why?
@poumason what happens if you use the snippet that @nwhitmont provided, which you can also find in the official documentation.
My guess is that the sign-in card only works when you provide the redirect URI for Cortana, https://www.bing.com/agents/oauth. I have used this successfully in the past, where adding this redirect_uri was enough to get it to work.
I try to use official documentation the sample.
But it is not work.
I capture my debug log in the Cortana:
"attachments": [
{
"contentType": "application/vnd.microsoft.card.signin",
"content": {
"text": "",
"buttons": [
{
"type": "signin",
"title": "Connect",
"value": "https://login.microsoftonline.com/?redirect_uri=http%3a%2f%2fbing.com%2fagents%2foauth"
}
]
}
}
],
other question:
the URL https://www.bing.com/agents/oauth, Where do I should setting it? the card action of the Sign-in card or the redirect uri setting page of the OAuth website (such as Google OAuth console website)?
@poumason You are commenting on a closed issue. Please open a new issue.
Cortana Skills with Bot Framework Developer Preview does not currently support the Sign-In Card workflow on the Cortana channel.
The Cortana team is actively working on integrating this feature, with planned release of this functionality in the next few months.