Skip to content
Open
Show file tree
Hide file tree
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
20 changes: 4 additions & 16 deletions .github/workflows/build-complete-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ jobs:
name: 'msgext-link-unfurling-reddit'
version: '6.0.x'

- project_path: 'samples/app-region-selection/csharp/RegionSectionApp/RegionSelectionApp.csproj'
- project_path: 'samples/app-region-selection/csharp/app-region-selection/app-region-selection.csproj'
name: 'app-region-selection'
version: '6.0.x'
version: '10.0.x'

- project_path: 'samples/tab-external-auth/csharp/TabExternalAuth/TabExternalAuth.csproj'
name: 'tab-external-auth'
Expand Down Expand Up @@ -328,9 +328,9 @@ jobs:
name: 'meetings-live-caption'
version: '6.0.x'

- project_path: 'samples/meetings-transcription/csharp/MeetingTranscription/MeetingTranscription.csproj'
- project_path: 'samples/meetings-transcription/csharp/meetings-transcription/meetings-transcription.csproj'
name: 'meetings-transcription'
version: '6.0.x'
version: '10.0.x'

- project_path: 'samples/meetings-share-to-stage-signing/csharp/Source/MeetingSigning.Domain.Tests/Microsoft.Teams.Samples.MeetingSigning.Domain.Tests.csproj'
name: 'meetings-share-to-stage-signing'
Expand Down Expand Up @@ -1202,10 +1202,6 @@ jobs:
name: 'bot-initiate-thread-in-channel'
version: '3.10.x'

- project_path: 'samples/graph-pinned-messages/python'
name: 'graph-pinned-messages'
version: '3.10.x'

- project_path: 'samples/msgext-search/python'
name: 'msgext-search'
version: '3.10.x'
Expand All @@ -1221,10 +1217,6 @@ jobs:
- project_path: 'samples/msgext-link-unfurling/python'
name: 'msgext-link-unfurling'
version: '3.10.x'

- project_path: 'samples/msgext-message-reminder/python'
name: 'msgext-message-reminder'
version: '3.10.x'

- project_path: 'samples/msgext-search-auth-config/python'
name: 'msgext-search-auth-config'
Expand Down Expand Up @@ -1254,10 +1246,6 @@ jobs:
name: 'agent-knowledge-hub'
version: '3.13.x'

- project_path: 'samples/bot-all-cards/python'
name: 'bot-all-cards'
version: '3.13.x'

fail-fast: false
name: Build all "${{ matrix.name }}" python
defaults:
Expand Down
10 changes: 10 additions & 0 deletions samples/app-region-selection/csharp/M365Agent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# TeamsFx files
build
appPackage/build
env/.env.*.user
env/.env.local
appsettings.Development.json
.deployment

# User-specific files
*.user
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" Sdk="Microsoft.TeamsFx.Sdk">
<PropertyGroup Label="Globals">
<ProjectGuid>1d1ae3f7-cf5e-4793-b1ea-11e95cbce7b2</ProjectGuid>
<ProjectGuid>b069b3bd-f6bc-cc40-82ab-3fcc2ea50fdf</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<None Include="m365agents.local.yml" />
<None Include="m365agents.yml" />
</ItemGroup>
<ItemGroup>
<ProjectCapability Include="ProjectConfigurationsDeclaredDimensions" />
</ItemGroup>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 52 additions & 52 deletions samples/app-region-selection/csharp/M365Agent/appPackage/manifest.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
"manifestVersion": "1.19",
"version": "1.0.0",
"id": "${{TEAMS_APP_ID}}",
"developer": {
"name": "Microsoft",
"websiteUrl": "https://www.microsoft.com",
"privacyUrl": "https://www.microsoft.com/privacy",
"termsOfUseUrl": "https://www.microsoft.com/termsofuse"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Region Selection App",
"full": "It will help to select Data center's region"
},
"description": {
"short": "Microsoft Teams app for region selection using Bot and Tab with adaptive cards.",
"full": "This Microsoft Teams app allows users to select and set a region using a Bot and Tab."
},
"accentColor": "#FFFFFF",
"configurableTabs": [
{
"configurationUrl": "https://${{BOT_DOMAIN}}/configure",
"canUpdateConfiguration": true,
"scopes": [
"team",
"groupChat"
]
}
],
"bots": [
{
"botId": "${{AAD_APP_CLIENT_ID}}",
"scopes": [
"personal",
"team",
"groupChat"
],
"supportsFiles": false,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"${{BOT_DOMAIN}}"
]
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.23/MicrosoftTeams.schema.json",
"manifestVersion": "1.23",
"version": "1.0.0",
"id": "${{TEAMS_APP_ID}}",
"developer": {
"name": "Microsoft",
"websiteUrl": "https://www.microsoft.com",
"privacyUrl": "https://www.microsoft.com/privacy",
"termsOfUseUrl": "https://www.microsoft.com/termsofuse"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Region Selection App",
"full": "It will help to select Data center's region"
},
"description": {
"short": "Microsoft Teams app for region selection using Bot and Tab with adaptive cards.",
"full": "This Microsoft Teams app allows users to select and set a region using a Bot and Tab."
},
"accentColor": "#FFFFFF",
"configurableTabs": [
{
"configurationUrl": "https://${{BOT_DOMAIN}}/configure",
"canUpdateConfiguration": true,
"scopes": [
"team",
"groupChat"
]
}
],
"bots": [
{
"botId": "${{BOT_ID}}",
"scopes": [
"personal",
"team",
"groupChat"
],
"supportsFiles": false,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"${{BOT_DOMAIN}}"
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions samples/app-region-selection/csharp/M365Agent/env/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file includes environment variables that will be committed to git by default.

# Built-in environment variables
TEAMSFX_ENV=dev
APP_NAME_SUFFIX=dev

# Updating AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP_NAME after provision may also require an update to RESOURCE_SUFFIX, because some services require a globally unique name across subscriptions/resource groups.
AZURE_SUBSCRIPTION_ID=
AZURE_RESOURCE_GROUP_NAME=
RESOURCE_SUFFIX=

# Generated during provision, you can also add your own variables.
BOT_ID=
TEAMS_APP_ID=
BOT_AZURE_APP_SERVICE_RESOURCE_ID=
13 changes: 1 addition & 12 deletions samples/app-region-selection/csharp/M365Agent/env/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,8 @@ APP_NAME_SUFFIX=local
# Generated during provision, you can also add your own variables.
BOT_ID=
TEAMS_APP_ID=
RESOURCE_SUFFIX=
AZURE_SUBSCRIPTION_ID=
AZURE_RESOURCE_GROUP_NAME=
AAD_APP_CLIENT_ID=
AAD_APP_OBJECT_ID=
AAD_APP_TENANT_ID=
AAD_APP_OAUTH_AUTHORITY=
AAD_APP_OAUTH_AUTHORITY_HOST=
TEAMS_APP_TENANT_ID=
MICROSOFT_APP_TYPE=
MICROSOFT_APP_TENANT_ID=


BOT_OBJECT_ID=
TEAMSFX_M365_USER_NAME=

BOT_ENDPOINT=
Expand Down
96 changes: 69 additions & 27 deletions samples/app-region-selection/csharp/M365Agent/infra/azure.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,84 @@
@description('Used to generate names for all resources in this file')
param resourceBaseName string

@description('Required when create Azure Bot service')
param botAadAppClientId string

param botAppDomain string
param webAppSKU string

@maxLength(42)
param botDisplayName string

param botServiceName string = resourceBaseName
param botServiceSku string = 'F0'
param microsoftAppType string
param microsoftAppTenantId string
param serverfarmsName string = resourceBaseName
param webAppName string = resourceBaseName
param identityName string = resourceBaseName
param location string = resourceGroup().location

// Register your web service as a bot with the Bot Framework
resource botService 'Microsoft.BotService/botServices@2021-03-01' = {
kind: 'azurebot'
location: 'global'
name: botServiceName
properties: {
displayName: botDisplayName
endpoint: 'https://${botAppDomain}/api/messages'
msaAppId: botAadAppClientId
msaAppType: microsoftAppType
msaAppTenantId: microsoftAppType == 'SingleTenant' ? microsoftAppTenantId : ''
}
resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
location: location
name: identityName
}

// Compute resources for your Web App
resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
kind: 'app'
location: location
name: serverfarmsName
sku: {
name: botServiceSku
name: webAppSKU
}
}

// Connect the bot service to Microsoft Teams
resource botServiceMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
parent: botService
location: 'global'
name: 'MsTeamsChannel'
// Web App that hosts your bot
resource webApp 'Microsoft.Web/sites@2021-02-01' = {
kind: 'app'
location: location
name: webAppName
properties: {
channelName: 'MsTeamsChannel'
serverFarmId: serverfarm.id
httpsOnly: true
siteConfig: {
appSettings: [
{
name: 'WEBSITE_RUN_FROM_PACKAGE'
value: '1'
}
{
name: 'Teams__ClientId'
value: identity.properties.clientId
}
{
name: 'Teams__TenantId'
value: identity.properties.tenantId
}
{
name: 'Teams__BotType'
value: 'UserAssignedMsi'
}
]
ftpsState: 'FtpsOnly'
}
}
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'${identity.id}': {}
}
}
}

// Register your web service as a bot with the Bot Framework
module azureBotRegistration './botRegistration/azurebot.bicep' = {
name: 'Azure-Bot-registration'
params: {
resourceBaseName: resourceBaseName
identityClientId: identity.properties.clientId
identityResourceId: identity.id
identityTenantId: identity.properties.tenantId
botAppDomain: webApp.properties.defaultHostName
botDisplayName: botDisplayName
}
}

// The output will be persisted in .env.{envName}. Visit https://aka.ms/teamsfx-actions/arm-deploy for more details.
output BOT_AZURE_APP_SERVICE_RESOURCE_ID string = webApp.id
output BOT_DOMAIN string = webApp.properties.defaultHostName
output BOT_ID string = identity.properties.clientId
output BOT_TENANT_ID string = identity.properties.tenantId
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceBaseName": {
"value": "bot${{RESOURCE_SUFFIX}}"
},
"botAadAppClientId": {
"value": "${{AAD_APP_CLIENT_ID}}"
},
"botAppDomain": {
"value": "${{BOT_DOMAIN}}"
},
"botDisplayName": {
"value": "app-region-selection"
},
"microsoftAppType": {
"value": "${{MICROSOFT_APP_TYPE}}"
},
"microsoftAppTenantId": {
"value": "${{MICROSOFT_APP_TENANT_ID}}"
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceBaseName": {
"value": "bot${{RESOURCE_SUFFIX}}"
},
"webAppSKU": {
"value": "B1"
},
"botDisplayName": {
"value": "app-region-selection"
}
}
}
}
}
Loading