Skip to content
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

[C#] docs: Update README.md | add steps for multi tenant support in dotnet auth sample documentation #2208

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion dotnet/samples/06.auth.teamsSSO.bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,25 @@ You can reset the message count by sending the bot the message `/reset`.

You can use Teams Toolkit for Visual Studio or CLI to host the bot in Azure. The sample includes Bicep templates in the `/infra` directory which are used by the tools to create resources in Azure.

You can find deployment instructions [here](../README.md#deploy-to-azure).
You can find deployment instructions [here](../README.md#deploy-to-azure).

## Instructions to enable multi-tenant support

This sample is configured to work only in the tenant in which the Azure app registration is created. To enable multi-tenant support a few configurations have to be updated:

1. Navigate to `aad.manifest.json` and set
```json
"signInAudience": "AzureADMultipleOrgs"
```
2. Navigate to the `teamsapp.local.yml` file and set
```yml
signInAudience: "AzureADMultipleOrgs" # Authenticate users with a Microsoft work or school account in your organization's Azure AD tenant (for example, single tenant).
```
3. Navigate to the `wwwroot/auth-start.html` page and set
```js
let authorizeEndpoint = `https://login.microsoftonline.com/common/oauth2/v2.0/authorize?${toQueryString(queryParams)}`;
```
4. Navigate to the `Program.cs` file and on line 40 set
```
.WithTenantId("common")
```
Loading