Skip to content

TeamsSDK sample updates: bot-auth-quickstart samples#14200

Open
Pranjal-MSFT wants to merge 8 commits intomainfrom
pranjalb-teamssdk-sample-code-updation-1
Open

TeamsSDK sample updates: bot-auth-quickstart samples#14200
Pranjal-MSFT wants to merge 8 commits intomainfrom
pranjalb-teamssdk-sample-code-updation-1

Conversation

@Pranjal-MSFT
Copy link
Copy Markdown
Collaborator

No description provided.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/authentication/bot-sso-code.md 83 28 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 51393fe:

⚠️ Validation status: warnings

File Status Preview URL Details
msteams-platform/bots/how-to/authentication/bot-sso-code.md ⚠️Warning View Details

msteams-platform/bots/how-to/authentication/bot-sso-code.md

  • Line 62, Column 1: [Warning: code-block-indented - See documentation] Indented code blocks aren't allowed. Use a Markdown code block surrounded by triple backticks (```).
  • Line 75, Column 1: [Warning: code-block-indented - See documentation] Indented code blocks aren't allowed. Use a Markdown code block surrounded by triple backticks (```).
  • Line 95, Column 1: [Warning: code-block-indented - See documentation] Indented code blocks aren't allowed. Use a Markdown code block surrounded by triple backticks (```).

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/authentication/bot-sso-code.md 83 28 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 4128d6f:

⚠️ Validation status: warnings

File Status Preview URL Details
msteams-platform/bots/how-to/authentication/bot-sso-code.md ⚠️Warning View Details

msteams-platform/bots/how-to/authentication/bot-sso-code.md

  • Line 62, Column 1: [Warning: code-block-indented - See documentation] Indented code blocks aren't allowed. Use a Markdown code block surrounded by triple backticks (```).
  • Line 73, Column 1: [Warning: code-block-indented - See documentation] Indented code blocks aren't allowed. Use a Markdown code block surrounded by triple backticks (```).
  • Line 90, Column 1: [Warning: code-block-indented - See documentation] Indented code blocks aren't allowed. Use a Markdown code block surrounded by triple backticks (```).

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/authentication/bot-sso-code.md 86 22 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 3ab1bf9:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/authentication/bot-sso-code.md ✅Succeeded View

For more details, please refer to the build report.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/authentication/bot-sso-code.md 86 22 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit a0fcc54:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/authentication/bot-sso-code.md ✅Succeeded View

For more details, please refer to the build report.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/authentication/bot-sso-code.md 85 24 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit c195b6d:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/authentication/bot-sso-code.md ✅Succeeded View

For more details, please refer to the build report.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/authentication/add-authentication.md 89 70 link
msteams-platform/bots/how-to/authentication/bot-sso-code.md 85 24 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 57d0e47:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/authentication/add-authentication.md ✅Succeeded View
msteams-platform/bots/how-to/authentication/bot-sso-code.md ✅Succeeded View

For more details, please refer to the build report.

| **Sample name** | **Description** | **.NET** | **Node.js** | **Python** | **Manifest**|
|---------------|------------|------------|-------------|---------------|---------------|
| Bot authentication | This sample app demonstrates how a bot can use Teams authentication. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-teams-authentication/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-teams-authentication/nodejs) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-teams-authentication/python) |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-teams-authentication/csharp/demo-manifest/bot-teams-authentication.zip)
| Bot authentication | This sample app demonstrates how a bot can use Teams authentication. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/dotnet/bot-auth-quickstart) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/nodejs/bot-auth-quickstart) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/python/bot-auth-quickstart) |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-teams-authentication/csharp/demo-manifest/bot-teams-authentication.zip)
Copy link
Copy Markdown

@YugalPradhan31 YugalPradhan31 Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add TeamsSDK in sample path in first 3 links:
Microsoft-Teams-Samples/tree/main/samples/TeamsSDK/bot-auth-quickstart
Remove demo-manifest zip folder link (4th link).

| **Sample name** | **Description** | **C#** | **Node.js** |
| --- | --- | --- | --- |
| Bot conversation SSO quick start | Quickly set up Teams bot with SSO for seamless user authentication for one-on-one and group chats. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-conversation-sso-quickstart/csharp_dotnetcore/BotConversationSsoQuickstart) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-conversation-sso-quickstart/js) |
| Bot Auth Quickstart | This sample demonstrates how to implement Single Sign-On (SSO) authentication for Microsoft Teams bots using Azure Active Directory | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/dotnet/bot-auth-quickstart) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/nodejs/bot-auth-quickstart) |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, add TeamsSDK in folder path.

- Set `ConnectionName` to the name of the identity provider connection you added to the bot registration. The name we used in this example is *BotTeamsAuthADv1*.
- Set `MicrosoftAppId` to the **bot App ID** you saved at the time of the bot registration.
- Set `ClientId` to the **bot App ID** you saved at the time of the bot registration.
- Set `MicrosoftAppPassword` to the **customer secret** you saved at the time of the bot registration.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MicrosoftAppPassword -> ClientSecret

Copy link
Copy Markdown

@YugalPradhan31 YugalPradhan31 Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this "Handling Invoke Activity" section completely

@Pranjal-MSFT Pranjal-MSFT requested a review from Copilot March 24, 2026 04:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Teams bot authentication/SSO documentation to align with the newer “bot-auth-quickstart” samples and a Teams SDK–oriented authentication flow.

Changes:

  • Refreshes SSO bot code guidance and restructures sections around OAuth setup, sign-in handling, and sign-out.
  • Updates bot authentication article sample links and revises configuration/manifest examples.
  • Renames/standardizes some documented config keys (for example, ClientId/ClientSecret, TenantId) and updates sample references.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.

File Description
msteams-platform/bots/how-to/authentication/bot-sso-code.md Replaces Bot Framework token-handling guidance with Teams SDK-style OAuth/auth/sign-out examples and updates the linked sample.
msteams-platform/bots/how-to/authentication/add-authentication.md Updates sample references to bot-auth-quickstart and revises configuration + manifest guidance accordingly.
Comments suppressed due to low confidence (1)

msteams-platform/bots/how-to/authentication/add-authentication.md:323

  • The Node.js setup section now instructs setting ClientId/ClientSecret, but the referenced sample paths in this section still point to bot-teams-authentication / bot-conversation-sso-quickstart. This looks inconsistent with the updated “bot-auth-quickstart” sample links and may cause readers to edit the wrong files. Please align the clone/cd/include paths and variable names with the intended sample.
1. Clone [node-auth-sample][teams-auth-bot-js].
1. In a console, go to the project: </br></br>
`cd samples/bot-teams-authentication/nodejs`
1. Install modules</br></br>
`npm install`
1. Update the **.env** configuration as follows:

    - Set `ClientId` to the **bot App ID** you saved at the time of the bot registration.
    - Set `ClientSecret` to the **customer secret** you saved at the time of the bot registration.
    - Set the `connectionName` to the name of the identity provider connection.
    Depending on the characters in your bot secret, you might need to XML escape the password. For example, any ampersands (&) must be encoded as `&amp;`.

     [!code-javascript[settings](~/../Microsoft-Teams-Samples/samples/bot-conversation-sso-quickstart/js/.env)]

Comment on lines +63 to +76
var builder = WebApplication.CreateBuilder(args);
var connectionName = builder.Configuration["Teams:ConnectionName"];

# [C#](#tab/cs1)
// Configure Teams app with OAuth builder.AddTeams(App.Builder().AddOAuth(connectionName));

Add the following code snippet to `AdapterWithErrorHandler.cs` (or the equivalent class in your app's code):
var app = builder.Build();
var teams = app.UseTeams();

```csharp
base.Use(new TeamsSSOTokenExchangeMiddleware(storage, configuration["ConnectionName"]));
```
var logger = app.Services.GetRequiredService()
.CreateLogger("BotAuthQuickstart");

# [JavaScript](#tab/js1)
// Handle error events teams.OnError(async (_, @event) => { logger.LogError(@event.Exception, "Error occurred"); });

Add the following code snippet to `index.js` (or the equivalent class in your app's code):
app.Run();
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new C# snippet appears non-functional as written: the Teams/OAuth configuration and the error handler are commented out, and app.Services.GetRequiredService() is missing a service type, so the snippet won’t compile or demonstrate the intended setup. Please provide a runnable example (or clearly mark pseudo-code) with the actual AddTeams/OAuth wiring and a valid logger acquisition.

Copilot uses AI. Check for mistakes.
1. Add code snippet for `TeamsSSOTokenExchangeMiddleware`.
```csharp
var builder = WebApplication.CreateBuilder(args);
var connectionName = builder.Configuration["Teams:ConnectionName"];
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc instructs users to set ConnectionName in environment variables, but the C# snippet reads builder.Configuration["Teams:ConnectionName"]. This mismatch will cause confusion and copy/paste failures unless the expected configuration key is clarified and made consistent across the steps and code.

Suggested change
var connectionName = builder.Configuration["Teams:ConnectionName"];
var connectionName = builder.Configuration["ConnectionName"];

Copilot uses AI. Check for mistakes.
Comment on lines +90 to +99
// Teams SDK handles errors automatically
// Optional: Add custom error logging in message handlers
app.on('message', async (context) =&gt; {
try {
// Your bot logic
} catch (error) {
context.logger?.error(`Error: ${error}`);
await context.send("An error occurred.");
}
});
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JavaScript code block contains HTML-escaped characters (for example =&gt;) inside a fenced code block. In fenced code, these entities render literally and break copy/paste. Please replace the escaped entities with the actual characters (for example =>).

Copilot uses AI. Check for mistakes.
Comment on lines +193 to +233
```csharp
// Helper function to handle authentication
async Task&lt;Microsoft.Graph.GraphServiceClient?&gt; GetAuthenticatedGraphClient(IContext context)
{
if (!context.IsSignedIn)
{
await context.Send("🔐 Please sign in first to access Microsoft Graph.");
await context.SignIn();
return null;
}

try
{
return context.GetUserGraphClient();
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to create Graph client");
await context.Send("🔐 Failed to create authenticated client. Trying to sign in again.");
await context.SignIn();
return null;
}
}

// Handle sign-in command
async Task HandleSignInCommand(IContext context)
{
if (context.IsSignedIn)
{
await context.Send("✅ You are already signed in!");
}
else
{
await context.Send("🔐 Signing you in to access Microsoft Graph...");
await context.SignIn();
}
}

// Register command handler
teams.OnMessage("signin", async context =&gt; await HandleSignInCommand(context));
```
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The C# snippet includes HTML-escaped generics and lambdas (for example Task&lt;...&gt; and =&gt;). In code fences these typically render literally, breaking readability and copy/paste. Please replace HTML entities with the actual characters (<, >, =>).

Copilot uses AI. Check for mistakes.
Comment on lines 296 to 297
- Set `ClientId` to the **bot App ID** you saved at the time of the bot registration.
- Set `MicrosoftAppPassword` to the **customer secret** you saved at the time of the bot registration.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration instructions now mix ClientId with MicrosoftAppPassword in the same list. If the sample has moved to new key names, the secret should be updated consistently (for example ClientSecret) or the doc should explicitly state which keys apply to which SDK/runtime to avoid misconfiguration.

Suggested change
- Set `ClientId` to the **bot App ID** you saved at the time of the bot registration.
- Set `MicrosoftAppPassword` to the **customer secret** you saved at the time of the bot registration.
- Set `MicrosoftAppId` (called `ClientId` in some older samples) to the **bot App ID** you saved at the time of the bot registration.
- Set `MicrosoftAppPassword` (the bot's client secret, sometimes referred to as `ClientSecret`) to the **client secret** you saved at the time of the bot registration.

Copilot uses AI. Check for mistakes.
Comment on lines +237 to +244
```JavaScript
// Helper function to handle authentication
async function getAuthenticatedGraphClient(context: any): Promise&lt;any | null&gt; {
if (!context.isSignedIn) {
await context.send("🔐 Please sign in first to access Microsoft Graph.");
await context.signin();
return null;
}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “JavaScript” snippet uses TypeScript-only syntax (type annotations like context: any and return types like Promise<...>). This won’t run as JavaScript and is misleading in a JS tab. Either change the tab/language label to TypeScript or remove the type annotations so the snippet is valid JavaScript.

Copilot uses AI. Check for mistakes.
Comment on lines 389 to +406
```JavaScript
async interrupt(innerDc) {
if (innerDc.context.activity.type === ActivityTypes.Message) {
const text = innerDc.context.activity.text.toLowerCase();
if (text === 'logout') {
const userTokenClient = innerDc.context.turnState.get(innerDc.context.adapter.UserTokenClientKey);

const { activity } = innerDc.context;
await userTokenClient.signOutUser(activity.from.id, this.connectionName, activity.channelId);

await innerDc.context.sendActivity('You have been signed out.');
return await innerDc.cancelAllDialogs();
}
}
}
async function handleSignout(context: any): Promise&lt;void&gt; {
if (!context.isSignedIn) {
await context.send("ℹ️ You are not currently signed in.");
} else {
await context.signout();
await context.send("👋 You have been signed out successfully!");
}
}

// Dispatch incoming messages
app.on('message', async (context) =&gt; {
const text = context.activity.text?.toLowerCase().trim() || '';

if (text === 'signout' || text === 'logout') {
await handleSignout(context);
}
});
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “JavaScript” sign-out snippet is written with TypeScript type annotations (for example context: any and Promise<void>) and also contains HTML-escaped =&gt;. Please make the snippet valid JavaScript (or move it to a TypeScript tab) and remove HTML entity escaping so readers can copy/paste it.

Copilot uses AI. Check for mistakes.
Comment on lines 540 to 546
```json
{
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
- {
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
"manifestVersion": "1.19",
"version": "1.0.0",
"id": "",
"id": "${{TEAMS_APP_ID}}",
"developer": {
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manifest JSON example includes a leading - before {, which makes the snippet invalid JSON and breaks copy/paste. Please remove the stray dash so the code block is valid JSON.

Copilot uses AI. Check for mistakes.

const app = new App({
oauth: {
defaultConnectionName: process.env.CONNECTION_NAME || 'graph'
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps tell users to set ConnectionName in their environment/config, but the JavaScript example reads process.env.CONNECTION_NAME. Please make the configuration key consistent (including casing/underscores) between the written instructions and the code sample to prevent misconfiguration.

Suggested change
defaultConnectionName: process.env.CONNECTION_NAME || 'graph'
defaultConnectionName: process.env.ConnectionName || 'graph'

Copilot uses AI. Check for mistakes.
| **Sample name** | **Description** | **C#** | **Node.js** |
| --- | --- | --- | --- |
| Bot conversation SSO quick start | Quickly set up Teams bot with SSO for seamless user authentication for one-on-one and group chats. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-conversation-sso-quickstart/csharp_dotnetcore/BotConversationSsoQuickstart) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-conversation-sso-quickstart/js) |
| Bot Auth Quickstart | This sample demonstrates how to implement Single Sign-On (SSO) authentication for Microsoft Teams bots using Azure Active Directory | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/dotnet/bot-auth-quickstart) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/nodejs/bot-auth-quickstart) |
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample description uses the legacy name “Azure Active Directory”. Elsewhere in this article set the identity provider as Microsoft Entra ID, so the sample description should be updated to “Microsoft Entra ID” for consistency and accuracy.

Suggested change
| Bot Auth Quickstart | This sample demonstrates how to implement Single Sign-On (SSO) authentication for Microsoft Teams bots using Azure Active Directory | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/dotnet/bot-auth-quickstart) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/nodejs/bot-auth-quickstart) |
| Bot Auth Quickstart | This sample demonstrates how to implement Single Sign-On (SSO) authentication for Microsoft Teams bots using Microsoft Entra ID | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/dotnet/bot-auth-quickstart) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-auth-quickstart/nodejs/bot-auth-quickstart) |

Copilot uses AI. Check for mistakes.
@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/authentication/add-authentication.md 90 68 link
msteams-platform/bots/how-to/authentication/bot-sso-code.md 91 7 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 531ad29:

⚠️ Validation status: warnings

File Status Preview URL Details
msteams-platform/bots/how-to/authentication/bot-sso-code.md ⚠️Warning View Details
msteams-platform/bots/how-to/authentication/add-authentication.md ✅Succeeded View

msteams-platform/bots/how-to/authentication/bot-sso-code.md

  • Line 28, Column 4: [Warning: bookmark-not-found - See documentation] Cannot find bookmark '#handle-authentication-and-sign-in' in 'bots/how-to/authentication/bot-sso-code.md'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/authentication/add-authentication.md 89 70 link
msteams-platform/bots/how-to/authentication/bot-sso-code.md 91 7 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 9c3487a:

⚠️ Validation status: warnings

File Status Preview URL Details
msteams-platform/bots/how-to/authentication/add-authentication.md ⚠️Warning View Details
msteams-platform/bots/how-to/authentication/bot-sso-code.md ⚠️Warning View Details

msteams-platform/bots/how-to/authentication/add-authentication.md

  • Line 24, Column 272: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../Downloads/auth-flow-bot.md'.
  • Line 85, Column 376: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../../../concepts/build-and-test/teams-developer-portal.md'.
  • Line 159, Column 27: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../create-a-bot-for-teams.md'.
  • Line 210, Column 4: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../Downloads/~/assets/images/authentication/sample-app-demo-bot-configuration.png'.
  • Line 288, Column 1: [Warning: multiple-h1s - See documentation] Multiple H1s(H1 'C#/.NET') are not allowed. You can only have one top-level heading.
  • Line 288, Column 3: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../Downloads/add-authentication.md'.
  • Line 288, Column 1: [Warning: duplicate-h1s - See documentation] H1 'C#/.NET' is duplicated with other articles: 'bots/how-to/authentication/add-authentication.md(288,1), bots/how-to/authentication/add-authentication.md(594,1)'. First level headings must be unique within a docset.
  • Line 301, Column 6: [Warning: codesnippet-not-found] Invalid code snippet link: '../../../../../../../Downloads/Microsoft-Teams-Samples/samples/bot-teams-authentication/csharp/appsettings.json'.
  • Line 308, Column 1: [Warning: multiple-h1s - See documentation] Multiple H1s(H1 'JavaScript') are not allowed. You can only have one top-level heading.
  • Line 308, Column 3: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../Downloads/add-authentication.md'.
  • Line 308, Column 1: [Warning: duplicate-h1s - See documentation] H1 'JavaScript' is duplicated with other articles: 'bots/how-to/authentication/add-authentication.md(308,1), bots/how-to/authentication/add-authentication.md(631,1)'. First level headings must be unique within a docset.
  • Line 322, Column 6: [Warning: codesnippet-not-found] Invalid code snippet link: '../../../../../../../Downloads/Microsoft-Teams-Samples/samples/bot-conversation-sso-quickstart/js/.env'.
  • Line 329, Column 1: [Warning: multiple-h1s - See documentation] Multiple H1s(H1 'Python') are not allowed. You can only have one top-level heading.
  • Line 329, Column 3: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../Downloads/add-authentication.md'.
  • Line 329, Column 1: [Warning: duplicate-h1s - See documentation] H1 'Python' is duplicated with other articles: 'bots/how-to/authentication/add-authentication.md(329,1), bots/how-to/authentication/add-authentication.md(663,1)'. First level headings must be unique within a docset.
  • Line 339, Column 7: [Warning: codesnippet-not-found] Invalid code snippet link: '../../../../../../../Downloads/Microsoft-Teams-Samples/samples/bot-teams-authentication/python/config.py'.
  • Line 594, Column 1: [Warning: multiple-h1s - See documentation] Multiple H1s(H1 'C#/.NET') are not allowed. You can only have one top-level heading.
  • Line 594, Column 3: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../Downloads/add-authentication.md'.
  • Line 594, Column 1: [Warning: duplicate-h1s - See documentation] H1 'C#/.NET' is duplicated with other articles: 'bots/how-to/authentication/add-authentication.md(288,1), bots/how-to/authentication/add-authentication.md(594,1)'. First level headings must be unique within a docset.
  • Line 598, Column 1: [Warning: codesnippet-not-found] Invalid code snippet link: '../../../../../../../Downloads/Microsoft-Teams-Samples/samples/bot-teams-authentication/csharp/Bots/DialogBot.cs'.
  • Line 604, Column 1: [Warning: codesnippet-not-found] Invalid code snippet link: '../../../../../../../Downloads/Microsoft-Teams-Samples/samples/bot-teams-authentication/csharp/Bots/TeamsBot.cs'.
  • Line 631, Column 1: [Warning: multiple-h1s - See documentation] Multiple H1s(H1 'JavaScript') are not allowed. You can only have one top-level heading.
  • Line 631, Column 3: [Warning: file-not-found - See documentation] Invalid file link: '../../../../../../../Downloads/add-authentication.md'.
  • Line 631, Column 1: [Warning: duplicate-h1s - See documentation] H1 'JavaScript' is duplicated with other articles: 'bots/how-to/authentication/add-authentication.md(308,1), bots/how-to/authentication/add-authentication.md(631,1)'. First level headings must be unique within a docset.
  • Line 635, Column 1: [Warning: codesnippet-not-found] Invalid code snippet link: '../../../../../../../Downloads/Microsoft-Teams-Samples/samples/bot-conversation-sso-quickstart/js/bots/dialogBot.js'.

This comment lists only the first 25 errors (including error/warning/suggestion) in the pull request.
For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants