Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created July 9, 2025 02:58
Show Gist options
  • Select an option

  • Save KyMidd/c5ee63d3a47141e0991394c114e2ae40 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/c5ee63d3a47141e0991394c114e2ae40 to your computer and use it in GitHub Desktop.
def format_oauth_card(auth_url):
return {
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"text": "🔐 Sign in to authorize this Bot",
"weight": "Bolder",
"size": "Medium"
},
{
"type": "TextBlock",
"text": "To continue, please sign in with your Microsoft account.",
"wrap": True
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "Sign in with Microsoft",
"url": auth_url
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment