Skip to content

Conversation

@docsautomation
Copy link
Contributor

@docsautomation docsautomation bot commented Dec 5, 2025

This PR updates the content of the file: msteams-platform/bots/how-to/authentication/bot-sso-code.md.

Submitted by: @yashy797

@microsoft-production-github-app

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 82 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
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
Contributor

Learn Build status updates of commit 0780e1a:

✅ 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.

# Add code to enable SSO in your bot app

Before you add code to enable single sign-on (SSO), ensure to configure your app and bot resource in Microsoft Entra admin center.
Before adding code to enable single sign-on (SSO), ensure you configure your app and bot resource in Microsoft Entra admin center.
Copy link
Collaborator

Choose a reason for hiding this comment

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

As per Microsoft style guide, this is not correct. Change this to - Before you add code to enable single sign-on (SSO), configure your app and bot resource in Microsoft Entra admin

> [Configure bot app in Microsoft Entra ID](bot-sso-register-aad.md)
You need to configure your app's code to obtain an access token from Microsoft Entra ID. The access token is issued on behalf of the bot app.
Configure your app's code to obtain an access token from Microsoft Entra ID. The access token issues on behalf of the bot app.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Configure your app's code to obtain an access token from Microsoft Entra ID. The access token is issued on behalf of the bot app. - change it to this

- The token's `scp` parameter is set to `access_as_user`.
- Valid SSO tokens issue from Microsoft Entra ID. The `iss` claim in the token must begin with this value.
- The token's `aud1` parameter sets to the app ID generated during Microsoft Entra app registration.
- The token's `scp` parameter sets to `access_as_user`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please retain the original version. This edited version is incorrect.

- Checking that the token is targeted to the web API.
- Verifying that the token issued by the intended authority.
- Confirming that the token targets the web API.

Copy link
Collaborator

Choose a reason for hiding this comment

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

retain the original content

:::image type="content" source="../../../assets/images/authentication/teams-sso-bots/permissions-requested-small.png" alt-text="The image shows the permissions requested pop-up on mobile" lightbox="../../../assets/images/authentication/teams-sso-bots/permissions-requested-mobile.png" border="false":::

The user must select **Accept** to give consent.
The user must select **Accept** to provide consent.
Copy link
Collaborator

Choose a reason for hiding this comment

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

retain original


:::image type="content" source="../../../assets/images/authentication/teams-sso-bots/permissions-requested-desktop-small.png" alt-text="The image shows permissions requested pop-up on desktop" lightbox="../../../assets/images/authentication/teams-sso-bots/permissions-requested-desktop.png" border="false":::

The user must select **Accept** to give consent.
Copy link
Collaborator

Choose a reason for hiding this comment

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

retain original

#### Microsoft Entra ID consent is required

When a bot is added to a group chat for the first time and consent is required for a particular user, a consent dialog box appears only to the user who @mentions the bot. The user must give one-time consent to the permissions requested by the bot app to get the access token.
When a bot adds to a group chat for the first time and consent is required for a particular user, a consent dialog appears only for the user who @mentions the bot. That user must consent one time to the permissions requested by your bot app to obtain the access token.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Only change dialog box to dialog rest to retain from the original content

// Listen for incoming requests.
expressApp.post('/api/messages', async (req, res) => {
// Route received a request to adapter for processing.
// Route received request to adapter for processing.
Copy link
Collaborator

Choose a reason for hiding this comment

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

retain original

# [JavaScript](#tab/js2)

After you add the code snippet for `TeamsSSOTokenExchangeMiddleware`, the following code must appear:
After adding the code snippet for `TeamsSSOTokenExchangeMiddleware`, include the following code:
Copy link
Collaborator

Choose a reason for hiding this comment

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

retain you add, rest is fine

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

Successfully merging this pull request may close these issues.

2 participants