From 4428164e5463becd50a5b3048be589c4b08886e4 Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 09:14:29 +0530 Subject: [PATCH 01/11] PR 4 - Implement New toolkit version csharp samples --- .../csharp/BotFormattingCards.sln | 11 ++++ .../csharp/BotFormattingCards.slnLaunch.user | 47 ++++++++++++++++++ .../csharp/BotFormattingCards/.gitignore | 2 +- .../Properties/launchSettings.json | 31 +++--------- .../csharp/BotFormattingCards/env/.env.local | 22 -------- .../csharp/TeamsApp/TeamsApp.ttkproj | 9 ++++ .../appPackage}/color.png | Bin .../appPackage}/manifest.json | 0 .../appPackage}/outline.png | Bin .../infra/azure.bicep | 0 .../infra/azure.parameters.json | 0 .../csharp/TeamsApp/launchSettings.json | 17 +++++++ .../teamsapp.local.yml | 38 ++++++-------- 13 files changed, 109 insertions(+), 68 deletions(-) create mode 100644 samples/bot-formatting-cards/csharp/BotFormattingCards.slnLaunch.user delete mode 100644 samples/bot-formatting-cards/csharp/BotFormattingCards/env/.env.local create mode 100644 samples/bot-formatting-cards/csharp/TeamsApp/TeamsApp.ttkproj rename samples/bot-formatting-cards/csharp/{BotFormattingCards/AppManifest => TeamsApp/appPackage}/color.png (100%) rename samples/bot-formatting-cards/csharp/{BotFormattingCards/AppManifest => TeamsApp/appPackage}/manifest.json (100%) rename samples/bot-formatting-cards/csharp/{BotFormattingCards/AppManifest => TeamsApp/appPackage}/outline.png (100%) rename samples/bot-formatting-cards/csharp/{BotFormattingCards => TeamsApp}/infra/azure.bicep (100%) rename samples/bot-formatting-cards/csharp/{BotFormattingCards => TeamsApp}/infra/azure.parameters.json (100%) create mode 100644 samples/bot-formatting-cards/csharp/TeamsApp/launchSettings.json rename samples/bot-formatting-cards/csharp/{BotFormattingCards => TeamsApp}/teamsapp.local.yml (78%) diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards.sln b/samples/bot-formatting-cards/csharp/BotFormattingCards.sln index 28ab692d3a..d6614924d2 100644 --- a/samples/bot-formatting-cards/csharp/BotFormattingCards.sln +++ b/samples/bot-formatting-cards/csharp/BotFormattingCards.sln @@ -5,6 +5,13 @@ VisualStudioVersion = 17.4.33213.308 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotFormattingCards", "BotFormattingCards\BotFormattingCards.csproj", "{783D6E6F-7339-4D74-89D4-B240496CC7A3}" EndProject +Project("{A9E3F50B-275E-4AF7-ADCE-8BE12D41E305}") = "TeamsApp", "TeamsApp\TeamsApp.ttkproj", "{3F6A1C23-8A4D-4464-A110-A5D92B178476}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C7554D92-2D8D-4EAC-8E7A-6125A7D80D17}" + ProjectSection(SolutionItems) = preProject + BotFormattingCards.slnLaunch.user = BotFormattingCards.slnLaunch.user + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +22,10 @@ Global {783D6E6F-7339-4D74-89D4-B240496CC7A3}.Debug|Any CPU.Build.0 = Debug|Any CPU {783D6E6F-7339-4D74-89D4-B240496CC7A3}.Release|Any CPU.ActiveCfg = Release|Any CPU {783D6E6F-7339-4D74-89D4-B240496CC7A3}.Release|Any CPU.Build.0 = Release|Any CPU + {3F6A1C23-8A4D-4464-A110-A5D92B178476}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F6A1C23-8A4D-4464-A110-A5D92B178476}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F6A1C23-8A4D-4464-A110-A5D92B178476}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F6A1C23-8A4D-4464-A110-A5D92B178476}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards.slnLaunch.user b/samples/bot-formatting-cards/csharp/BotFormattingCards.slnLaunch.user new file mode 100644 index 0000000000..aadb7cb6fb --- /dev/null +++ b/samples/bot-formatting-cards/csharp/BotFormattingCards.slnLaunch.user @@ -0,0 +1,47 @@ +[ + { + "Name": "Microsoft Teams (browser)", + "Projects": [ + { + "Path": "BotFormattingCards\\BotFormattingCards.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft Teams (browser)" + } + ] + }, + { + "Name": "Microsoft 365 app (browser)", + "Projects": [ + { + "Path": "BotFormattingCards\\BotFormattingCards.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft 365 app (browser)" + } + ] + }, + { + "Name": "Outlook (browser)", + "Projects": [ + { + "Path": "BotFormattingCards\\BotFormattingCards.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Outlook (browser)" + } + ] + } +] \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/.gitignore b/samples/bot-formatting-cards/csharp/BotFormattingCards/.gitignore index d231a7a175..7466c01f9c 100644 --- a/samples/bot-formatting-cards/csharp/BotFormattingCards/.gitignore +++ b/samples/bot-formatting-cards/csharp/BotFormattingCards/.gitignore @@ -1,6 +1,6 @@ # TeamsFx files build -AppManifest/build +appPackage/build env/.env.*.user env/.env.local appsettings.Development.json diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/Properties/launchSettings.json b/samples/bot-formatting-cards/csharp/BotFormattingCards/Properties/launchSettings.json index 068eff82a9..d985e43c6f 100644 --- a/samples/bot-formatting-cards/csharp/BotFormattingCards/Properties/launchSettings.json +++ b/samples/bot-formatting-cards/csharp/BotFormattingCards/Properties/launchSettings.json @@ -1,28 +1,13 @@ { "profiles": { - // Debug project within Teams - "Microsoft Teams (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "https://teams.microsoft.com/l/app/%TEAMSAPPID%?installAppPackage=true&webjoin=true&appTenantId=%TENANTID%&login_hint=%USERNAME%", - "applicationUrl": "http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore" + "Start Project": { + "commandName": "Project", + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:7130;http://localhost:5130", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "hotReloadProfile": "aspnetcore" } - //// Uncomment following profile to debug project only (without launching Teams) - //, - //"Start Project (not in Teams)": { - // "commandName": "Project", - // "dotnetRunMessages": true, - // "launchBrowser": true, - // "applicationUrl": "https://localhost:7130;http://localhost:5130", - // "environmentVariables": { - // "ASPNETCORE_ENVIRONMENT": "Development" - // }, - // "hotReloadProfile": "aspnetcore" - //} } } \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/env/.env.local b/samples/bot-formatting-cards/csharp/BotFormattingCards/env/.env.local deleted file mode 100644 index 925ac446fd..0000000000 --- a/samples/bot-formatting-cards/csharp/BotFormattingCards/env/.env.local +++ /dev/null @@ -1,22 +0,0 @@ -# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. - -# Built-in environment variables -TEAMSFX_ENV=local -APP_NAME_SUFFIX=local - -# Generated during provision, you can also add your own variables. -BOT_ID= -TEAMS_APP_ID= -RESOURCE_SUFFIX= -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= -TEAMSFX_M365_USER_NAME= - -BOT_ENDPOINT= -BOT_DOMAIN= \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/TeamsApp/TeamsApp.ttkproj b/samples/bot-formatting-cards/csharp/TeamsApp/TeamsApp.ttkproj new file mode 100644 index 0000000000..bb831ae102 --- /dev/null +++ b/samples/bot-formatting-cards/csharp/TeamsApp/TeamsApp.ttkproj @@ -0,0 +1,9 @@ + + + + 3f6a1c23-8a4d-4464-a110-a5d92b178476 + + + + + \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/AppManifest/color.png b/samples/bot-formatting-cards/csharp/TeamsApp/appPackage/color.png similarity index 100% rename from samples/bot-formatting-cards/csharp/BotFormattingCards/AppManifest/color.png rename to samples/bot-formatting-cards/csharp/TeamsApp/appPackage/color.png diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/AppManifest/manifest.json b/samples/bot-formatting-cards/csharp/TeamsApp/appPackage/manifest.json similarity index 100% rename from samples/bot-formatting-cards/csharp/BotFormattingCards/AppManifest/manifest.json rename to samples/bot-formatting-cards/csharp/TeamsApp/appPackage/manifest.json diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/AppManifest/outline.png b/samples/bot-formatting-cards/csharp/TeamsApp/appPackage/outline.png similarity index 100% rename from samples/bot-formatting-cards/csharp/BotFormattingCards/AppManifest/outline.png rename to samples/bot-formatting-cards/csharp/TeamsApp/appPackage/outline.png diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/infra/azure.bicep b/samples/bot-formatting-cards/csharp/TeamsApp/infra/azure.bicep similarity index 100% rename from samples/bot-formatting-cards/csharp/BotFormattingCards/infra/azure.bicep rename to samples/bot-formatting-cards/csharp/TeamsApp/infra/azure.bicep diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/infra/azure.parameters.json b/samples/bot-formatting-cards/csharp/TeamsApp/infra/azure.parameters.json similarity index 100% rename from samples/bot-formatting-cards/csharp/BotFormattingCards/infra/azure.parameters.json rename to samples/bot-formatting-cards/csharp/TeamsApp/infra/azure.parameters.json diff --git a/samples/bot-formatting-cards/csharp/TeamsApp/launchSettings.json b/samples/bot-formatting-cards/csharp/TeamsApp/launchSettings.json new file mode 100644 index 0000000000..06ce10109b --- /dev/null +++ b/samples/bot-formatting-cards/csharp/TeamsApp/launchSettings.json @@ -0,0 +1,17 @@ +{ + "profiles": { + // Debug project within Teams + "Microsoft Teams (browser)": { + "commandName": "Project", + "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Microsoft 365 app (browser)": { + "commandName": "Project", + "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Outlook (browser)": { + "commandName": "Project", + "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" + } + } +} \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/teamsapp.local.yml b/samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.local.yml similarity index 78% rename from samples/bot-formatting-cards/csharp/BotFormattingCards/teamsapp.local.yml rename to samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.local.yml index c4e4358c90..40f65aee3c 100644 --- a/samples/bot-formatting-cards/csharp/BotFormattingCards/teamsapp.local.yml +++ b/samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.local.yml @@ -40,7 +40,7 @@ provision: # Generate runtime appsettings to JSON file - uses: file/createOrUpdateJsonFile with: - target: ./appsettings.json + target: ../BotFormattingCards/appsettings.json content: MicrosoftAppId: ${{AAD_APP_CLIENT_ID}} MicrosoftAppPassword: ${{SECRET_AAD_APP_CLIENT_SECRET}} @@ -59,20 +59,20 @@ provision: - uses: teamsApp/validateManifest with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json + manifestPath: ./appPackage/manifest.json # Build Teams app package with latest env value - uses: teamsApp/zipAppPackage with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json - outputZipPath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip - outputJsonPath: ./AppManifest/build/manifest.${{TEAMSFX_ENV}}.json + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json # Validate app package using validation rules - uses: teamsApp/validateAppPackage with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Apply the Teams app manifest to an existing Teams app in # Teams Developer Portal. @@ -80,20 +80,14 @@ provision: - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip - - # Create or update debug profile in lauchsettings file - - uses: file/createOrUpdateJsonFile + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 with: - target: ./Properties/launchSettings.json - content: - profiles: - Microsoft Teams (browser): - commandName: "Project" - dotnetRunMessages: true - launchBrowser: true - launchUrl: "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - applicationUrl: "http://localhost:5130" - environmentVariables: - ASPNETCORE_ENVIRONMENT: "Development" - hotReloadProfile: "aspnetcore" \ No newline at end of file + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID \ No newline at end of file From 3be4cb4d8ecbf008b5f6362a936924bd94e78087 Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 09:19:08 +0530 Subject: [PATCH 02/11] Add env file and update readme --- samples/bot-formatting-cards/csharp/README.md | 11 +++---- .../csharp/TeamsApp/env/.env.local | 29 +++++++++++++++++++ .../teamsapp.yml | 0 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 samples/bot-formatting-cards/csharp/TeamsApp/env/.env.local rename samples/bot-formatting-cards/csharp/{BotFormattingCards => TeamsApp}/teamsapp.yml (100%) diff --git a/samples/bot-formatting-cards/csharp/README.md b/samples/bot-formatting-cards/csharp/README.md index 11d533b178..b92de0e7ef 100644 --- a/samples/bot-formatting-cards/csharp/README.md +++ b/samples/bot-formatting-cards/csharp/README.md @@ -46,10 +46,11 @@ Please find below demo manifest which is deployed on Microsoft Azure and you can ## Run the app (Using Teams Toolkit for Visual Studio) The simplest way to run this sample in Teams is to use Teams Toolkit for Visual Studio. -1. Install Visual Studio 2022 **Version 17.9 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) +1. Install Visual Studio 2022 **Version 17.10 Preview 4 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) 1. Install Teams Toolkit for Visual Studio [Teams Toolkit extension](https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/toolkit-v4/install-teams-toolkit-vs?pivots=visual-studio-v17-7) 1. In the debug dropdown menu of Visual Studio, select Dev Tunnels > Create A Tunnel (set authentication type to Public) or select an existing public dev tunnel. -1. In Visual Studio, right-click your project and **Select Teams Toolkit > Prepare Teams App Dependencies** +1. In the debug dropdown menu of Visual Studio, select default startup project > **Microsoft Teams (browser)** +1. In Visual Studio, right-click your **TeamsApp** project and **Select Teams Toolkit > Prepare Teams App Dependencies** 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps. 1. Select **Debug > Start Debugging** or **F5** to run the menu in Visual Studio. 1. In the browser that launches, select the **Add** button to install the app to Teams. @@ -189,14 +190,14 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual 5. Setup Manifest for Teams - __*This step is specific to Teams.*__ - - **Edit** the `manifest.json` contained in the ./Manifest folder to replace your MicrosoftAppId (that was created when you registered your app registration earlier) *everywhere* you see the place holder string `{{Microsoft-App-Id}}` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) + - **Edit** the `manifest.json` contained in the ./appPackage folder to replace your MicrosoftAppId (that was created when you registered your app registration earlier) *everywhere* you see the place holder string `{{Microsoft-App-Id}}` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) - **Edit** the `manifest.json` for `validDomains` and replace `{{domain-name}}` with base Url of your domain. E.g. if you are using ngrok it would be `https://1234.ngrok-free.app` then your domain-name will be `1234.ngrok-free.app` and if you are using dev tunnels then your domain will be like: `12345.devtunnels.ms`. - - **Zip** up the contents of the `Manifest` folder to create a `manifest.zip` (Make sure that zip file does not contains any subfolder otherwise you will get error while uploading your .zip package) + - **Zip** up the contents of the `appPackage` folder to create a `manifest.zip` (Make sure that zip file does not contains any subfolder otherwise you will get error while uploading your .zip package) - Upload the manifest.zip to Teams (in the Apps view click "Upload a custom app") - Go to Microsoft Teams. From the lower left corner, select Apps - From the lower left corner, choose Upload a custom App - - Go to your project directory, the ./AppManifest folder, select the zip folder, and choose Open. + - Go to your project directory, the ./appPackage folder, select the zip folder, and choose Open. - Select Add in the pop-up dialog box. Your app is uploaded to Teams. ## Running the sample diff --git a/samples/bot-formatting-cards/csharp/TeamsApp/env/.env.local b/samples/bot-formatting-cards/csharp/TeamsApp/env/.env.local new file mode 100644 index 0000000000..df72956614 --- /dev/null +++ b/samples/bot-formatting-cards/csharp/TeamsApp/env/.env.local @@ -0,0 +1,29 @@ +# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. + +# Built-in environment variables +TEAMSFX_ENV=local +APP_NAME_SUFFIX=local + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +RESOURCE_SUFFIX= +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= +AZURE_SUBSCRIPTION_ID= +AZURE_RESOURCE_GROUP_NAME= +M365_TITLE_ID= +M365_APP_ID= + + + +TEAMSFX_M365_USER_NAME= + +BOT_ENDPOINT= +BOT_DOMAIN= \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards/teamsapp.yml b/samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.yml similarity index 100% rename from samples/bot-formatting-cards/csharp/BotFormattingCards/teamsapp.yml rename to samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.yml From 78ba59b3a46b0fc2884addd9ae0d6b837e854b18 Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 10:18:39 +0530 Subject: [PATCH 03/11] bot-adaptive-card-actions --- .../csharp/AdaptiveCardActions.sln | 11 ++++ .../csharp/AdaptiveCardActions.slnLaunch.user | 47 ++++++++++++++++++ .../csharp/AdaptiveCardActions/.gitignore | 2 +- .../Properties/launchSettings.json | 31 +++--------- .../csharp/AdaptiveCardActions/env/.env.local | 22 -------- .../csharp/TeamsApp/TeamsApp.ttkproj | 9 ++++ .../appPackage}/color.png | Bin .../appPackage}/manifest.json | 0 .../appPackage}/outline.png | Bin .../infra/azure.bicep | 0 .../infra/azure.parameters.json | 0 .../csharp/TeamsApp/launchSettings.json | 17 +++++++ .../teamsapp.local.yml | 37 ++++++-------- 13 files changed, 109 insertions(+), 67 deletions(-) create mode 100644 samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.slnLaunch.user delete mode 100644 samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/env/.env.local create mode 100644 samples/bot-adaptive-card-actions/csharp/TeamsApp/TeamsApp.ttkproj rename samples/bot-adaptive-card-actions/csharp/{AdaptiveCardActions/AppManifest => TeamsApp/appPackage}/color.png (100%) rename samples/bot-adaptive-card-actions/csharp/{AdaptiveCardActions/AppManifest => TeamsApp/appPackage}/manifest.json (100%) rename samples/bot-adaptive-card-actions/csharp/{AdaptiveCardActions/AppManifest => TeamsApp/appPackage}/outline.png (100%) rename samples/bot-adaptive-card-actions/csharp/{AdaptiveCardActions => TeamsApp}/infra/azure.bicep (100%) rename samples/bot-adaptive-card-actions/csharp/{AdaptiveCardActions => TeamsApp}/infra/azure.parameters.json (100%) create mode 100644 samples/bot-adaptive-card-actions/csharp/TeamsApp/launchSettings.json rename samples/bot-adaptive-card-actions/csharp/{AdaptiveCardActions => TeamsApp}/teamsapp.local.yml (78%) diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.sln b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.sln index 5ddf07d988..30022d6059 100644 --- a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.sln +++ b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.sln @@ -5,6 +5,13 @@ VisualStudioVersion = 17.4.33205.214 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdaptiveCardActions", "AdaptiveCardActions\AdaptiveCardActions.csproj", "{BFDF6B3D-BB62-42DD-88EF-528FFE9FCBAD}" EndProject +Project("{A9E3F50B-275E-4AF7-ADCE-8BE12D41E305}") = "TeamsApp", "TeamsApp\TeamsApp.ttkproj", "{BD0063E4-061D-459C-A143-9805F2A64B99}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6794E91B-8779-453A-8802-7CD6A1B3A07A}" + ProjectSection(SolutionItems) = preProject + AdaptiveCardActions.slnLaunch.user = AdaptiveCardActions.slnLaunch.user + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +22,10 @@ Global {BFDF6B3D-BB62-42DD-88EF-528FFE9FCBAD}.Debug|Any CPU.Build.0 = Debug|Any CPU {BFDF6B3D-BB62-42DD-88EF-528FFE9FCBAD}.Release|Any CPU.ActiveCfg = Release|Any CPU {BFDF6B3D-BB62-42DD-88EF-528FFE9FCBAD}.Release|Any CPU.Build.0 = Release|Any CPU + {BD0063E4-061D-459C-A143-9805F2A64B99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD0063E4-061D-459C-A143-9805F2A64B99}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD0063E4-061D-459C-A143-9805F2A64B99}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD0063E4-061D-459C-A143-9805F2A64B99}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.slnLaunch.user b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.slnLaunch.user new file mode 100644 index 0000000000..18d85228f5 --- /dev/null +++ b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.slnLaunch.user @@ -0,0 +1,47 @@ +[ + { + "Name": "Microsoft Teams (browser)", + "Projects": [ + { + "Path": "AdaptiveCardActions\\AdaptiveCardActions.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft Teams (browser)" + } + ] + }, + { + "Name": "Microsoft 365 app (browser)", + "Projects": [ + { + "Path": "AdaptiveCardActions\\AdaptiveCardActions.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft 365 app (browser)" + } + ] + }, + { + "Name": "Outlook (browser)", + "Projects": [ + { + "Path": "AdaptiveCardActions\\AdaptiveCardActions.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Outlook (browser)" + } + ] + } +] \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/.gitignore b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/.gitignore index d231a7a175..7466c01f9c 100644 --- a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/.gitignore +++ b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/.gitignore @@ -1,6 +1,6 @@ # TeamsFx files build -AppManifest/build +appPackage/build env/.env.*.user env/.env.local appsettings.Development.json diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/Properties/launchSettings.json b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/Properties/launchSettings.json index 068eff82a9..d985e43c6f 100644 --- a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/Properties/launchSettings.json +++ b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/Properties/launchSettings.json @@ -1,28 +1,13 @@ { "profiles": { - // Debug project within Teams - "Microsoft Teams (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "https://teams.microsoft.com/l/app/%TEAMSAPPID%?installAppPackage=true&webjoin=true&appTenantId=%TENANTID%&login_hint=%USERNAME%", - "applicationUrl": "http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore" + "Start Project": { + "commandName": "Project", + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:7130;http://localhost:5130", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "hotReloadProfile": "aspnetcore" } - //// Uncomment following profile to debug project only (without launching Teams) - //, - //"Start Project (not in Teams)": { - // "commandName": "Project", - // "dotnetRunMessages": true, - // "launchBrowser": true, - // "applicationUrl": "https://localhost:7130;http://localhost:5130", - // "environmentVariables": { - // "ASPNETCORE_ENVIRONMENT": "Development" - // }, - // "hotReloadProfile": "aspnetcore" - //} } } \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/env/.env.local b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/env/.env.local deleted file mode 100644 index 925ac446fd..0000000000 --- a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/env/.env.local +++ /dev/null @@ -1,22 +0,0 @@ -# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. - -# Built-in environment variables -TEAMSFX_ENV=local -APP_NAME_SUFFIX=local - -# Generated during provision, you can also add your own variables. -BOT_ID= -TEAMS_APP_ID= -RESOURCE_SUFFIX= -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= -TEAMSFX_M365_USER_NAME= - -BOT_ENDPOINT= -BOT_DOMAIN= \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/TeamsApp/TeamsApp.ttkproj b/samples/bot-adaptive-card-actions/csharp/TeamsApp/TeamsApp.ttkproj new file mode 100644 index 0000000000..cacb029170 --- /dev/null +++ b/samples/bot-adaptive-card-actions/csharp/TeamsApp/TeamsApp.ttkproj @@ -0,0 +1,9 @@ + + + + bd0063e4-061d-459c-a143-9805f2a64b99 + + + + + \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/AppManifest/color.png b/samples/bot-adaptive-card-actions/csharp/TeamsApp/appPackage/color.png similarity index 100% rename from samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/AppManifest/color.png rename to samples/bot-adaptive-card-actions/csharp/TeamsApp/appPackage/color.png diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/AppManifest/manifest.json b/samples/bot-adaptive-card-actions/csharp/TeamsApp/appPackage/manifest.json similarity index 100% rename from samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/AppManifest/manifest.json rename to samples/bot-adaptive-card-actions/csharp/TeamsApp/appPackage/manifest.json diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/AppManifest/outline.png b/samples/bot-adaptive-card-actions/csharp/TeamsApp/appPackage/outline.png similarity index 100% rename from samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/AppManifest/outline.png rename to samples/bot-adaptive-card-actions/csharp/TeamsApp/appPackage/outline.png diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/infra/azure.bicep b/samples/bot-adaptive-card-actions/csharp/TeamsApp/infra/azure.bicep similarity index 100% rename from samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/infra/azure.bicep rename to samples/bot-adaptive-card-actions/csharp/TeamsApp/infra/azure.bicep diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/infra/azure.parameters.json b/samples/bot-adaptive-card-actions/csharp/TeamsApp/infra/azure.parameters.json similarity index 100% rename from samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/infra/azure.parameters.json rename to samples/bot-adaptive-card-actions/csharp/TeamsApp/infra/azure.parameters.json diff --git a/samples/bot-adaptive-card-actions/csharp/TeamsApp/launchSettings.json b/samples/bot-adaptive-card-actions/csharp/TeamsApp/launchSettings.json new file mode 100644 index 0000000000..06ce10109b --- /dev/null +++ b/samples/bot-adaptive-card-actions/csharp/TeamsApp/launchSettings.json @@ -0,0 +1,17 @@ +{ + "profiles": { + // Debug project within Teams + "Microsoft Teams (browser)": { + "commandName": "Project", + "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Microsoft 365 app (browser)": { + "commandName": "Project", + "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Outlook (browser)": { + "commandName": "Project", + "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" + } + } +} \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/teamsapp.local.yml b/samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.local.yml similarity index 78% rename from samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/teamsapp.local.yml rename to samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.local.yml index a6581f3dd9..71421015b8 100644 --- a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/teamsapp.local.yml +++ b/samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.local.yml @@ -40,7 +40,7 @@ provision: # Generate runtime appsettings to JSON file - uses: file/createOrUpdateJsonFile with: - target: ./appsettings.json + target: ../AdaptiveCardActions/appsettings.json content: MicrosoftAppId: ${{AAD_APP_CLIENT_ID}} MicrosoftAppPassword: ${{SECRET_AAD_APP_CLIENT_SECRET}} @@ -59,20 +59,20 @@ provision: - uses: teamsApp/validateManifest with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json + manifestPath: ./appPackage/manifest.json # Build Teams app package with latest env value - uses: teamsApp/zipAppPackage with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json - outputZipPath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip - outputJsonPath: ./AppManifest/build/manifest.${{TEAMSFX_ENV}}.json + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json # Validate app package using validation rules - uses: teamsApp/validateAppPackage with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Apply the Teams app manifest to an existing Teams app in # Teams Developer Portal. @@ -80,20 +80,15 @@ provision: - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Create or update debug profile in lauchsettings file - - uses: file/createOrUpdateJsonFile + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 with: - target: ./Properties/launchSettings.json - content: - profiles: - Microsoft Teams (browser): - commandName: "Project" - dotnetRunMessages: true - launchBrowser: true - launchUrl: "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - applicationUrl: "http://localhost:5130" - environmentVariables: - ASPNETCORE_ENVIRONMENT: "Development" - hotReloadProfile: "aspnetcore" \ No newline at end of file + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID \ No newline at end of file From 3b7d42a4b5b5a16bf916615d811e02e83404d495 Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 10:21:32 +0530 Subject: [PATCH 04/11] Updated env and readme --- .../csharp/README.md | 11 ++++---- .../csharp/TeamsApp/env/.env.local | 27 +++++++++++++++++++ .../teamsapp.yml | 0 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 samples/bot-adaptive-card-actions/csharp/TeamsApp/env/.env.local rename samples/bot-adaptive-card-actions/csharp/{AdaptiveCardActions => TeamsApp}/teamsapp.yml (100%) diff --git a/samples/bot-adaptive-card-actions/csharp/README.md b/samples/bot-adaptive-card-actions/csharp/README.md index 03736691f3..c0fda89bf7 100644 --- a/samples/bot-adaptive-card-actions/csharp/README.md +++ b/samples/bot-adaptive-card-actions/csharp/README.md @@ -42,10 +42,11 @@ Please find below demo manifest which is deployed on Microsoft Azure and you can ## Run the app (Using Teams Toolkit for Visual Studio) The simplest way to run this sample in Teams is to use Teams Toolkit for Visual Studio. -1. Install Visual Studio 2022 **Version 17.9 Preview 2 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) +1. Install Visual Studio 2022 **Version 17.10 Preview 4 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) 1. Install Teams Toolkit for Visual Studio [Teams Toolkit extension](https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/toolkit-v4/install-teams-toolkit-vs?pivots=visual-studio-v17-7) 1. In the debug dropdown menu of Visual Studio, select Dev Tunnels > Create A Tunnel (set authentication type to Public) or select an existing public dev tunnel. -1. In Visual Studio, right-click your project and **Select Teams Toolkit > Prepare Teams App Dependencies** +1. In the debug dropdown menu of Visual Studio, select default startup project > **Microsoft Teams (browser)** +1. In Visual Studio, right-click your **TeamsApp** project and **Select Teams Toolkit > Prepare Teams App Dependencies** 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps. 1. Select **Debug > Start Debugging** or **F5** to run the menu in Visual Studio. 1. In the browser that launches, select the **Add** button to install the app to Teams. @@ -94,14 +95,14 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual 4. Setup Manifest for Teams - __*This step is specific to Teams.*__ - - **Edit** the `manifest.json` contained in the ./AppManifest folder to replace your Microsoft App Id (that was created when you registered your app registration earlier) *everywhere* you see the place holder string `{{Microsoft-App-Id}}` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) + - **Edit** the `manifest.json` contained in the ./appPackage folder to replace your Microsoft App Id (that was created when you registered your app registration earlier) *everywhere* you see the place holder string `{{Microsoft-App-Id}}` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) - **Edit** the `manifest.json` for `validDomains` and replace `{{Domain-Name}}` with base Url of your domain. E.g. if you are using ngrok it would be `https://1234.ngrok-free.app` then your domain-name will be `1234.ngrok-free.app` and if you are using dev tunnels then your domain will be like: `12345.devtunnels.ms`. - - **Zip** up the contents of the `AppManifest` folder to create a `manifest.zip` (Make sure that zip file does not contains any subfolder otherwise you will get error while uploading your .zip package) + - **Zip** up the contents of the `appPackage` folder to create a `manifest.zip` (Make sure that zip file does not contains any subfolder otherwise you will get error while uploading your .zip package) - Upload the manifest.zip to Teams (in the Apps view click "Upload a custom app") - Go to Microsoft Teams. From the lower left corner, select Apps - From the lower left corner, choose Upload a custom App - - Go to your project directory, the ./AppManifest folder, select the zip folder, and choose Open. + - Go to your project directory, the ./appPackage folder, select the zip folder, and choose Open. - Select Add in the pop-up dialog box. Your app is uploaded to Teams. **Note**: If you are facing any issue in your app, please uncomment [this](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/AdapterWithErrorHandler.cs#L28) line and put your debugger for local debug. diff --git a/samples/bot-adaptive-card-actions/csharp/TeamsApp/env/.env.local b/samples/bot-adaptive-card-actions/csharp/TeamsApp/env/.env.local new file mode 100644 index 0000000000..7c44d153e4 --- /dev/null +++ b/samples/bot-adaptive-card-actions/csharp/TeamsApp/env/.env.local @@ -0,0 +1,27 @@ +# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. + +# Built-in environment variables +TEAMSFX_ENV=local +APP_NAME_SUFFIX=local + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +RESOURCE_SUFFIX= +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= +TEAMSFX_M365_USER_NAME= + +BOT_ENDPOINT= +BOT_DOMAIN= + +AZURE_SUBSCRIPTION_ID= +AZURE_RESOURCE_GROUP_NAME= +M365_TITLE_ID= +M365_APP_ID= \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/teamsapp.yml b/samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.yml similarity index 100% rename from samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/teamsapp.yml rename to samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.yml From f01cf881220912b48b9d5a3eefb8f82670b50c7c Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 11:19:14 +0530 Subject: [PATCH 05/11] bot-daily-task-reminder --- .../csharp/BotDailyTaskReminder.sln | 15 +++++- .../BotDailyTaskReminder.slnLaunch.user | 47 ++++++++++++++++++ .../csharp/BotDailyTaskReminder/.gitignore | 2 +- .../Properties/launchSettings.json | 31 +++--------- .../BotDailyTaskReminder/env/.env.local | 22 -------- .../csharp/TeamsApp/TeamsApp.ttkproj | 9 ++++ .../appPackage}/color.png | Bin .../appPackage}/manifest.json | 0 .../appPackage}/outline.png | Bin .../infra/azure.bicep | 0 .../infra/azure.parameters.json | 0 .../csharp/TeamsApp/launchSettings.json | 17 +++++++ .../teamsapp.local.yml | 38 ++++++-------- 13 files changed, 111 insertions(+), 70 deletions(-) create mode 100644 samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.slnLaunch.user delete mode 100644 samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/env/.env.local create mode 100644 samples/bot-daily-task-reminder/csharp/TeamsApp/TeamsApp.ttkproj rename samples/bot-daily-task-reminder/csharp/{BotDailyTaskReminder/AppManifest => TeamsApp/appPackage}/color.png (100%) rename samples/bot-daily-task-reminder/csharp/{BotDailyTaskReminder/AppManifest => TeamsApp/appPackage}/manifest.json (100%) rename samples/bot-daily-task-reminder/csharp/{BotDailyTaskReminder/AppManifest => TeamsApp/appPackage}/outline.png (100%) rename samples/bot-daily-task-reminder/csharp/{BotDailyTaskReminder => TeamsApp}/infra/azure.bicep (100%) rename samples/bot-daily-task-reminder/csharp/{BotDailyTaskReminder => TeamsApp}/infra/azure.parameters.json (100%) create mode 100644 samples/bot-daily-task-reminder/csharp/TeamsApp/launchSettings.json rename samples/bot-daily-task-reminder/csharp/{BotDailyTaskReminder => TeamsApp}/teamsapp.local.yml (78%) diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.sln b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.sln index a8b98ceb77..102a858c21 100644 --- a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.sln +++ b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.sln @@ -1,10 +1,17 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31410.357 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34814.14 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotDailyTaskReminder", "BotDailyTaskReminder\BotDailyTaskReminder.csproj", "{BFDF6B3D-BB62-42DD-88EF-528FFE9FCBAD}" EndProject +Project("{A9E3F50B-275E-4AF7-ADCE-8BE12D41E305}") = "TeamsApp", "TeamsApp\TeamsApp.ttkproj", "{01E9AC3F-43C7-46DA-89BB-7E70F4B08B5C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9268A822-4DDA-4A0B-A2EB-E3551E6CE680}" + ProjectSection(SolutionItems) = preProject + BotDailyTaskReminder.slnLaunch.user = BotDailyTaskReminder.slnLaunch.user + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +22,10 @@ Global {BFDF6B3D-BB62-42DD-88EF-528FFE9FCBAD}.Debug|Any CPU.Build.0 = Debug|Any CPU {BFDF6B3D-BB62-42DD-88EF-528FFE9FCBAD}.Release|Any CPU.ActiveCfg = Release|Any CPU {BFDF6B3D-BB62-42DD-88EF-528FFE9FCBAD}.Release|Any CPU.Build.0 = Release|Any CPU + {01E9AC3F-43C7-46DA-89BB-7E70F4B08B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01E9AC3F-43C7-46DA-89BB-7E70F4B08B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01E9AC3F-43C7-46DA-89BB-7E70F4B08B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01E9AC3F-43C7-46DA-89BB-7E70F4B08B5C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.slnLaunch.user b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.slnLaunch.user new file mode 100644 index 0000000000..1a833d11fc --- /dev/null +++ b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.slnLaunch.user @@ -0,0 +1,47 @@ +[ + { + "Name": "Microsoft Teams (browser)", + "Projects": [ + { + "Path": "BotDailyTaskReminder\\BotDailyTaskReminder.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft Teams (browser)" + } + ] + }, + { + "Name": "Microsoft 365 app (browser)", + "Projects": [ + { + "Path": "BotDailyTaskReminder\\BotDailyTaskReminder.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft 365 app (browser)" + } + ] + }, + { + "Name": "Outlook (browser)", + "Projects": [ + { + "Path": "BotDailyTaskReminder\\BotDailyTaskReminder.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Outlook (browser)" + } + ] + } +] \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/.gitignore b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/.gitignore index d231a7a175..7466c01f9c 100644 --- a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/.gitignore +++ b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/.gitignore @@ -1,6 +1,6 @@ # TeamsFx files build -AppManifest/build +appPackage/build env/.env.*.user env/.env.local appsettings.Development.json diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/Properties/launchSettings.json b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/Properties/launchSettings.json index 068eff82a9..d985e43c6f 100644 --- a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/Properties/launchSettings.json +++ b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/Properties/launchSettings.json @@ -1,28 +1,13 @@ { "profiles": { - // Debug project within Teams - "Microsoft Teams (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "https://teams.microsoft.com/l/app/%TEAMSAPPID%?installAppPackage=true&webjoin=true&appTenantId=%TENANTID%&login_hint=%USERNAME%", - "applicationUrl": "http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore" + "Start Project": { + "commandName": "Project", + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:7130;http://localhost:5130", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "hotReloadProfile": "aspnetcore" } - //// Uncomment following profile to debug project only (without launching Teams) - //, - //"Start Project (not in Teams)": { - // "commandName": "Project", - // "dotnetRunMessages": true, - // "launchBrowser": true, - // "applicationUrl": "https://localhost:7130;http://localhost:5130", - // "environmentVariables": { - // "ASPNETCORE_ENVIRONMENT": "Development" - // }, - // "hotReloadProfile": "aspnetcore" - //} } } \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/env/.env.local b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/env/.env.local deleted file mode 100644 index 925ac446fd..0000000000 --- a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/env/.env.local +++ /dev/null @@ -1,22 +0,0 @@ -# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. - -# Built-in environment variables -TEAMSFX_ENV=local -APP_NAME_SUFFIX=local - -# Generated during provision, you can also add your own variables. -BOT_ID= -TEAMS_APP_ID= -RESOURCE_SUFFIX= -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= -TEAMSFX_M365_USER_NAME= - -BOT_ENDPOINT= -BOT_DOMAIN= \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/TeamsApp/TeamsApp.ttkproj b/samples/bot-daily-task-reminder/csharp/TeamsApp/TeamsApp.ttkproj new file mode 100644 index 0000000000..bf60d54cd0 --- /dev/null +++ b/samples/bot-daily-task-reminder/csharp/TeamsApp/TeamsApp.ttkproj @@ -0,0 +1,9 @@ + + + + 01e9ac3f-43c7-46da-89bb-7e70f4b08b5c + + + + + \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/AppManifest/color.png b/samples/bot-daily-task-reminder/csharp/TeamsApp/appPackage/color.png similarity index 100% rename from samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/AppManifest/color.png rename to samples/bot-daily-task-reminder/csharp/TeamsApp/appPackage/color.png diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/AppManifest/manifest.json b/samples/bot-daily-task-reminder/csharp/TeamsApp/appPackage/manifest.json similarity index 100% rename from samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/AppManifest/manifest.json rename to samples/bot-daily-task-reminder/csharp/TeamsApp/appPackage/manifest.json diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/AppManifest/outline.png b/samples/bot-daily-task-reminder/csharp/TeamsApp/appPackage/outline.png similarity index 100% rename from samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/AppManifest/outline.png rename to samples/bot-daily-task-reminder/csharp/TeamsApp/appPackage/outline.png diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/infra/azure.bicep b/samples/bot-daily-task-reminder/csharp/TeamsApp/infra/azure.bicep similarity index 100% rename from samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/infra/azure.bicep rename to samples/bot-daily-task-reminder/csharp/TeamsApp/infra/azure.bicep diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/infra/azure.parameters.json b/samples/bot-daily-task-reminder/csharp/TeamsApp/infra/azure.parameters.json similarity index 100% rename from samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/infra/azure.parameters.json rename to samples/bot-daily-task-reminder/csharp/TeamsApp/infra/azure.parameters.json diff --git a/samples/bot-daily-task-reminder/csharp/TeamsApp/launchSettings.json b/samples/bot-daily-task-reminder/csharp/TeamsApp/launchSettings.json new file mode 100644 index 0000000000..06ce10109b --- /dev/null +++ b/samples/bot-daily-task-reminder/csharp/TeamsApp/launchSettings.json @@ -0,0 +1,17 @@ +{ + "profiles": { + // Debug project within Teams + "Microsoft Teams (browser)": { + "commandName": "Project", + "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Microsoft 365 app (browser)": { + "commandName": "Project", + "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Outlook (browser)": { + "commandName": "Project", + "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" + } + } +} \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/teamsapp.local.yml b/samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.local.yml similarity index 78% rename from samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/teamsapp.local.yml rename to samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.local.yml index 1b8ff75084..e7b6e61a92 100644 --- a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/teamsapp.local.yml +++ b/samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.local.yml @@ -40,7 +40,7 @@ provision: # Generate runtime appsettings to JSON file - uses: file/createOrUpdateJsonFile with: - target: ./appsettings.json + target: ../BotDailyTaskReminder/appsettings.json content: MicrosoftAppId: ${{AAD_APP_CLIENT_ID}} MicrosoftAppPassword: ${{SECRET_AAD_APP_CLIENT_SECRET}} @@ -60,20 +60,20 @@ provision: - uses: teamsApp/validateManifest with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json + manifestPath: ./appPackage/manifest.json # Build Teams app package with latest env value - uses: teamsApp/zipAppPackage with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json - outputZipPath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip - outputJsonPath: ./AppManifest/build/manifest.${{TEAMSFX_ENV}}.json + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json # Validate app package using validation rules - uses: teamsApp/validateAppPackage with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Apply the Teams app manifest to an existing Teams app in # Teams Developer Portal. @@ -81,20 +81,14 @@ provision: - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip - - # Create or update debug profile in lauchsettings file - - uses: file/createOrUpdateJsonFile + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 with: - target: ./Properties/launchSettings.json - content: - profiles: - Microsoft Teams (browser): - commandName: "Project" - dotnetRunMessages: true - launchBrowser: true - launchUrl: "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - applicationUrl: "http://localhost:5130" - environmentVariables: - ASPNETCORE_ENVIRONMENT: "Development" - hotReloadProfile: "aspnetcore" \ No newline at end of file + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID \ No newline at end of file From 20bf0b917c873e10874c79faf20d6a69b71ed79c Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 11:23:05 +0530 Subject: [PATCH 06/11] Add env file and updated readme --- .../bot-daily-task-reminder/csharp/README.md | 11 ++++---- .../csharp/TeamsApp/env/.env.local | 27 +++++++++++++++++++ .../teamsapp.yml | 0 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 samples/bot-daily-task-reminder/csharp/TeamsApp/env/.env.local rename samples/bot-daily-task-reminder/csharp/{BotDailyTaskReminder => TeamsApp}/teamsapp.yml (100%) diff --git a/samples/bot-daily-task-reminder/csharp/README.md b/samples/bot-daily-task-reminder/csharp/README.md index c8f943b211..d9bbeba109 100644 --- a/samples/bot-daily-task-reminder/csharp/README.md +++ b/samples/bot-daily-task-reminder/csharp/README.md @@ -49,10 +49,11 @@ Please find below demo manifest which is deployed on Microsoft Azure and you can ## Run the app (Using Teams Toolkit for Visual Studio) The simplest way to run this sample in Teams is to use Teams Toolkit for Visual Studio. -1. Install Visual Studio 2022 **Version 17.9 Preview 2 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) +1. Install Visual Studio 2022 **Version 17.10 Preview 4 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) 1. Install Teams Toolkit for Visual Studio [Teams Toolkit extension](https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/toolkit-v4/install-teams-toolkit-vs?pivots=visual-studio-v17-7) 1. In the debug dropdown menu of Visual Studio, select Dev Tunnels > Create A Tunnel (set authentication type to Public) or select an existing public dev tunnel. -1. In Visual Studio, right-click your project and **Select Teams Toolkit > Prepare Teams App Dependencies** +1. In the debug dropdown menu of Visual Studio, select default startup project > **Microsoft Teams (browser)** +1. In Visual Studio, right-click your **TeamsApp** project and **Select Teams Toolkit > Prepare Teams App Dependencies** 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps. 1. Select **Debug > Start Debugging** or **F5** to run the menu in Visual Studio. 1. In the browser that launches, select the **Add** button to install the app to Teams. @@ -96,14 +97,14 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual 5. Setup Manifest for Teams - __*This step is specific to Teams.*__ - - **Edit** the `manifest.json` contained in the ./AppManifest folder to replace your Microsoft App Id (that was created when you registered your app registration earlier) *everywhere* you see the place holder string `{{Microsoft-App-Id}}` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) + - **Edit** the `manifest.json` contained in the ./appPackage folder to replace your Microsoft App Id (that was created when you registered your app registration earlier) *everywhere* you see the place holder string `{{Microsoft-App-Id}}` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) - **Edit** the `manifest.json` for `validDomains` and replace `{{domain-name}}` with base Url of your domain. E.g. if you are using ngrok it would be `https://1234.ngrok-free.app` then your domain-name will be `1234.ngrok-free.app` and if you are using dev tunnels then your domain will be like: `12345.devtunnels.ms`. - - **Zip** up the contents of the `AppManifest` folder to create a `manifest.zip` (Make sure that zip file does not contains any subfolder otherwise you will get error while uploading your .zip package) + - **Zip** up the contents of the `appPackage` folder to create a `manifest.zip` (Make sure that zip file does not contains any subfolder otherwise you will get error while uploading your .zip package) - Upload the manifest.zip to Teams (in the Apps view click "Upload a custom app") - Go to Microsoft Teams. From the lower left corner, select Apps - From the lower left corner, choose Upload a custom App - - Go to your project directory, the ./AppManifest folder, select the zip folder, and choose Open. + - Go to your project directory, the ./appPackage folder, select the zip folder, and choose Open. - Select Add in the pop-up dialog box. Your app is uploaded to Teams. **Note**: If you are facing any issue in your app, please uncomment [this](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/AdapterWithErrorHandler.cs#L30) line and put your debugger for local debug. diff --git a/samples/bot-daily-task-reminder/csharp/TeamsApp/env/.env.local b/samples/bot-daily-task-reminder/csharp/TeamsApp/env/.env.local new file mode 100644 index 0000000000..7c44d153e4 --- /dev/null +++ b/samples/bot-daily-task-reminder/csharp/TeamsApp/env/.env.local @@ -0,0 +1,27 @@ +# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. + +# Built-in environment variables +TEAMSFX_ENV=local +APP_NAME_SUFFIX=local + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +RESOURCE_SUFFIX= +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= +TEAMSFX_M365_USER_NAME= + +BOT_ENDPOINT= +BOT_DOMAIN= + +AZURE_SUBSCRIPTION_ID= +AZURE_RESOURCE_GROUP_NAME= +M365_TITLE_ID= +M365_APP_ID= \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/teamsapp.yml b/samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.yml similarity index 100% rename from samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder/teamsapp.yml rename to samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.yml From f0439e5b3b67a33c55839bcf4ea297a68b4c6ccb Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 12:22:35 +0530 Subject: [PATCH 07/11] tab-request-approval --- .../csharp/TabRequestApproval.sln | 15 +++++- .../csharp/TabRequestApproval.slnLaunch.user | 47 ++++++++++++++++++ .../csharp/TabRequestApproval/.gitignore | 2 +- .../Properties/launchSettings.json | 31 +++--------- .../csharp/TabRequestApproval/env/.env.local | 30 ----------- .../csharp/TeamsApp/TeamsApp.ttkproj | 9 ++++ .../aad.manifest.json | 0 .../appPackage}/color.png | Bin .../appPackage}/manifest.json | 0 .../appPackage}/outline.png | Bin .../csharp/TeamsApp/launchSettings.json | 17 +++++++ .../teamsapp.local.yml | 38 ++++++-------- .../teamsapp.yml | 0 13 files changed, 111 insertions(+), 78 deletions(-) create mode 100644 samples/tab-request-approval/csharp/TabRequestApproval.slnLaunch.user delete mode 100644 samples/tab-request-approval/csharp/TabRequestApproval/env/.env.local create mode 100644 samples/tab-request-approval/csharp/TeamsApp/TeamsApp.ttkproj rename samples/tab-request-approval/csharp/{TabRequestApproval => TeamsApp}/aad.manifest.json (100%) rename samples/tab-request-approval/csharp/{TabRequestApproval/AppManifest => TeamsApp/appPackage}/color.png (100%) rename samples/tab-request-approval/csharp/{TabRequestApproval/AppManifest => TeamsApp/appPackage}/manifest.json (100%) rename samples/tab-request-approval/csharp/{TabRequestApproval/AppManifest => TeamsApp/appPackage}/outline.png (100%) create mode 100644 samples/tab-request-approval/csharp/TeamsApp/launchSettings.json rename samples/tab-request-approval/csharp/{TabRequestApproval => TeamsApp}/teamsapp.local.yml (76%) rename samples/tab-request-approval/csharp/{TabRequestApproval => TeamsApp}/teamsapp.yml (100%) diff --git a/samples/tab-request-approval/csharp/TabRequestApproval.sln b/samples/tab-request-approval/csharp/TabRequestApproval.sln index e135ebf13e..3d4f45c780 100644 --- a/samples/tab-request-approval/csharp/TabRequestApproval.sln +++ b/samples/tab-request-approval/csharp/TabRequestApproval.sln @@ -1,10 +1,17 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29123.88 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34814.14 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TabRequestApproval", "TabRequestApproval\TabRequestApproval.csproj", "{B18CD866-7E29-498F-88EA-C3B48C96CA7C}" EndProject +Project("{A9E3F50B-275E-4AF7-ADCE-8BE12D41E305}") = "TeamsApp", "TeamsApp\TeamsApp.ttkproj", "{4391E541-EF1B-4A21-A19E-50477F285E59}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F957E241-0952-4E5D-A6D9-01A85CE072E4}" + ProjectSection(SolutionItems) = preProject + TabRequestApproval.slnLaunch.user = TabRequestApproval.slnLaunch.user + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +22,10 @@ Global {B18CD866-7E29-498F-88EA-C3B48C96CA7C}.Debug|Any CPU.Build.0 = Debug|Any CPU {B18CD866-7E29-498F-88EA-C3B48C96CA7C}.Release|Any CPU.ActiveCfg = Release|Any CPU {B18CD866-7E29-498F-88EA-C3B48C96CA7C}.Release|Any CPU.Build.0 = Release|Any CPU + {4391E541-EF1B-4A21-A19E-50477F285E59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4391E541-EF1B-4A21-A19E-50477F285E59}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4391E541-EF1B-4A21-A19E-50477F285E59}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4391E541-EF1B-4A21-A19E-50477F285E59}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/tab-request-approval/csharp/TabRequestApproval.slnLaunch.user b/samples/tab-request-approval/csharp/TabRequestApproval.slnLaunch.user new file mode 100644 index 0000000000..6f86d72419 --- /dev/null +++ b/samples/tab-request-approval/csharp/TabRequestApproval.slnLaunch.user @@ -0,0 +1,47 @@ +[ + { + "Name": "Microsoft Teams (browser)", + "Projects": [ + { + "Path": "TabRequestApproval\\TabRequestApproval.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft Teams (browser)" + } + ] + }, + { + "Name": "Microsoft 365 app (browser)", + "Projects": [ + { + "Path": "TabRequestApproval\\TabRequestApproval.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft 365 app (browser)" + } + ] + }, + { + "Name": "Outlook (browser)", + "Projects": [ + { + "Path": "TabRequestApproval\\TabRequestApproval.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Outlook (browser)" + } + ] + } +] \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/.gitignore b/samples/tab-request-approval/csharp/TabRequestApproval/.gitignore index 9324f35f59..4596bae4d8 100644 --- a/samples/tab-request-approval/csharp/TabRequestApproval/.gitignore +++ b/samples/tab-request-approval/csharp/TabRequestApproval/.gitignore @@ -1,6 +1,6 @@ # TeamsFx files build -AppManifest/build +appPackage/build env/.env.*.user env/.env.local appsettings.Development.json diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/Properties/launchSettings.json b/samples/tab-request-approval/csharp/TabRequestApproval/Properties/launchSettings.json index 7ea52a6f31..9b9feeee56 100644 --- a/samples/tab-request-approval/csharp/TabRequestApproval/Properties/launchSettings.json +++ b/samples/tab-request-approval/csharp/TabRequestApproval/Properties/launchSettings.json @@ -1,28 +1,13 @@ { "profiles": { - // Debug project within Teams - "Microsoft Teams (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "https://teams.microsoft.com/l/app/%TEAMSAPPID%?installAppPackage=true&webjoin=true&appTenantId=%TENANTID%&login_hint=%USERNAME%", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore", - "applicationUrl": "https://localhost:44302;http://localhost:2544" + "Start Project": { + "commandName": "Project", + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:44302;http://localhost:2544", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "hotReloadProfile": "aspnetcore" } - //// Uncomment following profile to debug project only (without launching Teams) - //, - //"Start Project (not in Teams)": { - // "commandName": "Project", - // "dotnetRunMessages": true, - // "launchBrowser": true, - // "applicationUrl": "https://localhost:44302;http://localhost:2544", - // "environmentVariables": { - // "ASPNETCORE_ENVIRONMENT": "Development" - // }, - // "hotReloadProfile": "aspnetcore" - //} } } \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/env/.env.local b/samples/tab-request-approval/csharp/TabRequestApproval/env/.env.local deleted file mode 100644 index 099ebcdf5b..0000000000 --- a/samples/tab-request-approval/csharp/TabRequestApproval/env/.env.local +++ /dev/null @@ -1,30 +0,0 @@ -# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. - -# Built-in environment variables -TEAMSFX_ENV=local - -# Generated during provision, you can also add your own variables. -TEAMS_APP_ID= -AAD_APP_CLIENT_ID= -AAD_APP_OBJECT_ID= -AAD_APP_OAUTH2_PERMISSION_ID= -AAD_APP_TENANT_ID= -AAD_APP_OAUTH_AUTHORITY_HOST= -AAD_APP_OAUTH_AUTHORITY= -TAB_ENDPOINT= - -APP_NAME_SUFFIX= -TAB_DOMAIN= -TEAMS_APP_TENANT_ID= - - -AAD_APP_ACCESS_AS_USER_PERMISSION_ID= - - - - - - - - -TEAMSFX_M365_USER_NAME= \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TeamsApp/TeamsApp.ttkproj b/samples/tab-request-approval/csharp/TeamsApp/TeamsApp.ttkproj new file mode 100644 index 0000000000..d4546da253 --- /dev/null +++ b/samples/tab-request-approval/csharp/TeamsApp/TeamsApp.ttkproj @@ -0,0 +1,9 @@ + + + + 4391e541-ef1b-4a21-a19e-50477f285e59 + + + + + \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/aad.manifest.json b/samples/tab-request-approval/csharp/TeamsApp/aad.manifest.json similarity index 100% rename from samples/tab-request-approval/csharp/TabRequestApproval/aad.manifest.json rename to samples/tab-request-approval/csharp/TeamsApp/aad.manifest.json diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/AppManifest/color.png b/samples/tab-request-approval/csharp/TeamsApp/appPackage/color.png similarity index 100% rename from samples/tab-request-approval/csharp/TabRequestApproval/AppManifest/color.png rename to samples/tab-request-approval/csharp/TeamsApp/appPackage/color.png diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/AppManifest/manifest.json b/samples/tab-request-approval/csharp/TeamsApp/appPackage/manifest.json similarity index 100% rename from samples/tab-request-approval/csharp/TabRequestApproval/AppManifest/manifest.json rename to samples/tab-request-approval/csharp/TeamsApp/appPackage/manifest.json diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/AppManifest/outline.png b/samples/tab-request-approval/csharp/TeamsApp/appPackage/outline.png similarity index 100% rename from samples/tab-request-approval/csharp/TabRequestApproval/AppManifest/outline.png rename to samples/tab-request-approval/csharp/TeamsApp/appPackage/outline.png diff --git a/samples/tab-request-approval/csharp/TeamsApp/launchSettings.json b/samples/tab-request-approval/csharp/TeamsApp/launchSettings.json new file mode 100644 index 0000000000..06ce10109b --- /dev/null +++ b/samples/tab-request-approval/csharp/TeamsApp/launchSettings.json @@ -0,0 +1,17 @@ +{ + "profiles": { + // Debug project within Teams + "Microsoft Teams (browser)": { + "commandName": "Project", + "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Microsoft 365 app (browser)": { + "commandName": "Project", + "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Outlook (browser)": { + "commandName": "Project", + "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" + } + } +} \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/teamsapp.local.yml b/samples/tab-request-approval/csharp/TeamsApp/teamsapp.local.yml similarity index 76% rename from samples/tab-request-approval/csharp/TabRequestApproval/teamsapp.local.yml rename to samples/tab-request-approval/csharp/TeamsApp/teamsapp.local.yml index b517c4586f..623fc1f045 100644 --- a/samples/tab-request-approval/csharp/TabRequestApproval/teamsapp.local.yml +++ b/samples/tab-request-approval/csharp/TeamsApp/teamsapp.local.yml @@ -53,7 +53,7 @@ provision: # Generate runtime appsettings to JSON file - uses: file/createOrUpdateJsonFile with: - target: ./appsettings.json + target: ../TabRequestApproval/appsettings.json content: AzureAd: TenantId: ${{AAD_APP_TENANT_ID}} @@ -75,39 +75,33 @@ provision: - uses: teamsApp/validateManifest with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json + manifestPath: ./appPackage/manifest.json # Build Teams app package with latest env value - uses: teamsApp/zipAppPackage with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json - outputZipPath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip - outputJsonPath: ./AppManifest/build/manifest.${{TEAMSFX_ENV}}.json + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json # Validate app package using validation rules - uses: teamsApp/validateAppPackage with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Apply the Teams app manifest to an existing Teams app in # Teams Developer Portal. # Will use the app id in manifest file to determine which Teams app to update. - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip - - # Create or update debug profile in lauchsettings file - - uses: file/createOrUpdateJsonFile + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 with: - target: ./Properties/launchSettings.json - content: - profiles: - Microsoft Teams (browser): - commandName: "Project" - dotnetRunMessages: true - launchBrowser: true - launchUrl: "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - applicationUrl: "https://localhost:44302;http://localhost:2544" - environmentVariables: - ASPNETCORE_ENVIRONMENT: "Development" - hotReloadProfile: "aspnetcore" \ No newline at end of file + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/teamsapp.yml b/samples/tab-request-approval/csharp/TeamsApp/teamsapp.yml similarity index 100% rename from samples/tab-request-approval/csharp/TabRequestApproval/teamsapp.yml rename to samples/tab-request-approval/csharp/TeamsApp/teamsapp.yml From 64c260bc275a7ca410c86844c55a7bd9ac980bde Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 12:28:20 +0530 Subject: [PATCH 08/11] Update env and readme --- samples/tab-request-approval/csharp/README.md | 5 +-- .../csharp/TeamsApp/env/.env.local | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 samples/tab-request-approval/csharp/TeamsApp/env/.env.local diff --git a/samples/tab-request-approval/csharp/README.md b/samples/tab-request-approval/csharp/README.md index 5018157ed4..eee227dee5 100644 --- a/samples/tab-request-approval/csharp/README.md +++ b/samples/tab-request-approval/csharp/README.md @@ -51,9 +51,10 @@ Please find below demo manifest which is deployed on Microsoft Azure and you can ## Run the app (Using Teams Toolkit for Visual Studio) The simplest way to run this sample in Teams is to use Teams Toolkit for Visual Studio. -1. Install Visual Studio 2022 **Version 17.8 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) +1. Install Visual Studio 2022 **Version 17.10 Preview 4 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) 1. Install Teams Toolkit for Visual Studio [Teams Toolkit extension](https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/toolkit-v4/install-teams-toolkit-vs?pivots=visual-studio-v17-7) -1. In Visual Studio, right-click your project and **Select Teams Toolkit > Prepare Teams App Dependencies** +1. In the debug dropdown menu of Visual Studio, select default startup project > **Microsoft Teams (browser)** +1. In Visual Studio, right-click your **TeamsApp** project and **Select Teams Toolkit > Prepare Teams App Dependencies** 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps. 1. Select **Debug > Start Debugging** or **F5** to run the menu in Visual Studio. 1. In the browser that launches, select the **Add** button to install the app to Teams. diff --git a/samples/tab-request-approval/csharp/TeamsApp/env/.env.local b/samples/tab-request-approval/csharp/TeamsApp/env/.env.local new file mode 100644 index 0000000000..9cfb91994d --- /dev/null +++ b/samples/tab-request-approval/csharp/TeamsApp/env/.env.local @@ -0,0 +1,34 @@ +# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. + +# Built-in environment variables +TEAMSFX_ENV=local + +# Generated during provision, you can also add your own variables. +TEAMS_APP_ID= +AAD_APP_CLIENT_ID= +AAD_APP_OBJECT_ID= +AAD_APP_OAUTH2_PERMISSION_ID= +AAD_APP_TENANT_ID= +AAD_APP_OAUTH_AUTHORITY_HOST= +AAD_APP_OAUTH_AUTHORITY= +TAB_ENDPOINT= + +APP_NAME_SUFFIX= +TAB_DOMAIN= +TEAMS_APP_TENANT_ID= + + +AAD_APP_ACCESS_AS_USER_PERMISSION_ID= + + + + + + + + + +TEAMSFX_M365_USER_NAME= + +M365_TITLE_ID= +M365_APP_ID= \ No newline at end of file From ea89420841d153751d317fdc59f47fca6f5e0da0 Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 13:04:58 +0530 Subject: [PATCH 09/11] tab-meeting-transcript-recording --- .../csharp/MeetingTranscriptRecording.sln | 13 ++++- .../MeetingTranscriptRecording.slnLaunch.user | 47 ++++++++++++++++++ .../MeetingTranscriptRecording/.gitignore | 2 +- .../Properties/launchSettings.json | 31 +++--------- .../csharp/TeamsApp/TeamsApp.ttkproj | 9 ++++ .../aad.manifest.json | 0 .../appPackage}/color.png | Bin .../appPackage}/manifest.json | 0 .../appPackage}/outline.png | Bin .../env/.env.local | 3 ++ .../csharp/TeamsApp/launchSettings.json | 17 +++++++ .../teamsapp.local.yml | 41 +++++++-------- .../teamsapp.yml | 0 13 files changed, 115 insertions(+), 48 deletions(-) create mode 100644 samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.slnLaunch.user create mode 100644 samples/tab-meeting-transcript-recording/csharp/TeamsApp/TeamsApp.ttkproj rename samples/tab-meeting-transcript-recording/csharp/{MeetingTranscriptRecording => TeamsApp}/aad.manifest.json (100%) rename samples/tab-meeting-transcript-recording/csharp/{MeetingTranscriptRecording/AppManifest => TeamsApp/appPackage}/color.png (100%) rename samples/tab-meeting-transcript-recording/csharp/{MeetingTranscriptRecording/AppManifest => TeamsApp/appPackage}/manifest.json (100%) rename samples/tab-meeting-transcript-recording/csharp/{MeetingTranscriptRecording/AppManifest => TeamsApp/appPackage}/outline.png (100%) rename samples/tab-meeting-transcript-recording/csharp/{MeetingTranscriptRecording => TeamsApp}/env/.env.local (91%) create mode 100644 samples/tab-meeting-transcript-recording/csharp/TeamsApp/launchSettings.json rename samples/tab-meeting-transcript-recording/csharp/{MeetingTranscriptRecording => TeamsApp}/teamsapp.local.yml (75%) rename samples/tab-meeting-transcript-recording/csharp/{MeetingTranscriptRecording => TeamsApp}/teamsapp.yml (100%) diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.sln b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.sln index b66d50576b..92dd774c5b 100644 --- a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.sln +++ b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.sln @@ -3,7 +3,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.2.32602.215 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeetingTranscriptRecording", "MeetingTranscriptRecording\MeetingTranscriptRecording.csproj", "{AFC73EB1-C0BB-438E-98BC-31A0CD50C608}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MeetingTranscriptRecording", "MeetingTranscriptRecording\MeetingTranscriptRecording.csproj", "{AFC73EB1-C0BB-438E-98BC-31A0CD50C608}" +EndProject +Project("{A9E3F50B-275E-4AF7-ADCE-8BE12D41E305}") = "TeamsApp", "TeamsApp\TeamsApp.ttkproj", "{1A7810A0-962D-4870-B8A8-1A1D56DAE905}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F04852E6-2C15-4FB2-976E-F78EFAE3D990}" + ProjectSection(SolutionItems) = preProject + MeetingTranscriptRecording.slnLaunch.user = MeetingTranscriptRecording.slnLaunch.user + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +22,10 @@ Global {AFC73EB1-C0BB-438E-98BC-31A0CD50C608}.Debug|Any CPU.Build.0 = Debug|Any CPU {AFC73EB1-C0BB-438E-98BC-31A0CD50C608}.Release|Any CPU.ActiveCfg = Release|Any CPU {AFC73EB1-C0BB-438E-98BC-31A0CD50C608}.Release|Any CPU.Build.0 = Release|Any CPU + {1A7810A0-962D-4870-B8A8-1A1D56DAE905}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1A7810A0-962D-4870-B8A8-1A1D56DAE905}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A7810A0-962D-4870-B8A8-1A1D56DAE905}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1A7810A0-962D-4870-B8A8-1A1D56DAE905}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.slnLaunch.user b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.slnLaunch.user new file mode 100644 index 0000000000..8eb638271e --- /dev/null +++ b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.slnLaunch.user @@ -0,0 +1,47 @@ +[ + { + "Name": "Microsoft Teams (browser)", + "Projects": [ + { + "Path": "MeetingTranscriptRecording\\MeetingTranscriptRecording.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft Teams (browser)" + } + ] + }, + { + "Name": "Microsoft 365 app (browser)", + "Projects": [ + { + "Path": "MeetingTranscriptRecording\\MeetingTranscriptRecording.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Microsoft 365 app (browser)" + } + ] + }, + { + "Name": "Outlook (browser)", + "Projects": [ + { + "Path": "MeetingTranscriptRecording\\MeetingTranscriptRecording.csproj", + "Action": "Start", + "DebugTarget": "Start Project" + }, + { + "Path": "TeamsApp\\TeamsApp.ttkproj", + "Action": "StartWithoutDebugging", + "DebugTarget": "Outlook (browser)" + } + ] + } +] \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/.gitignore b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/.gitignore index 9324f35f59..4596bae4d8 100644 --- a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/.gitignore +++ b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/.gitignore @@ -1,6 +1,6 @@ # TeamsFx files build -AppManifest/build +appPackage/build env/.env.*.user env/.env.local appsettings.Development.json diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/Properties/launchSettings.json b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/Properties/launchSettings.json index ab57801b19..9b9feeee56 100644 --- a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/Properties/launchSettings.json +++ b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/Properties/launchSettings.json @@ -1,28 +1,13 @@ { "profiles": { - // Debug project within Teams - "Microsoft Teams (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "https://teams.microsoft.com/l/app/%TEAMSAPPID%?installAppPackage=true&webjoin=true&appTenantId=%TENANTID%&login_hint=%USERNAME%", - "applicationUrl": "https://localhost:44302;http://localhost:2544", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore" + "Start Project": { + "commandName": "Project", + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:44302;http://localhost:2544", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "hotReloadProfile": "aspnetcore" } - //// Uncomment following profile to debug project only (without launching Teams) - //, - //"Start Project (not in Teams)": { - // "commandName": "Project", - // "dotnetRunMessages": true, - // "launchBrowser": true, - // "applicationUrl": "https://localhost:44302;http://localhost:2544", - // "environmentVariables": { - // "ASPNETCORE_ENVIRONMENT": "Development" - // }, - // "hotReloadProfile": "aspnetcore" - //} } } \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/TeamsApp/TeamsApp.ttkproj b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/TeamsApp.ttkproj new file mode 100644 index 0000000000..6c6af564da --- /dev/null +++ b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/TeamsApp.ttkproj @@ -0,0 +1,9 @@ + + + + 1a7810a0-962d-4870-b8a8-1a1d56dae905 + + + + + \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/aad.manifest.json b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/aad.manifest.json similarity index 100% rename from samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/aad.manifest.json rename to samples/tab-meeting-transcript-recording/csharp/TeamsApp/aad.manifest.json diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/AppManifest/color.png b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/appPackage/color.png similarity index 100% rename from samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/AppManifest/color.png rename to samples/tab-meeting-transcript-recording/csharp/TeamsApp/appPackage/color.png diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/AppManifest/manifest.json b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/appPackage/manifest.json similarity index 100% rename from samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/AppManifest/manifest.json rename to samples/tab-meeting-transcript-recording/csharp/TeamsApp/appPackage/manifest.json diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/AppManifest/outline.png b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/appPackage/outline.png similarity index 100% rename from samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/AppManifest/outline.png rename to samples/tab-meeting-transcript-recording/csharp/TeamsApp/appPackage/outline.png diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/env/.env.local b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/env/.env.local similarity index 91% rename from samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/env/.env.local rename to samples/tab-meeting-transcript-recording/csharp/TeamsApp/env/.env.local index 1736197ac9..bd5a321256 100644 --- a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/env/.env.local +++ b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/env/.env.local @@ -27,4 +27,7 @@ AAD_APP_ACCESS_AS_USER_PERMISSION_ID= + +M365_TITLE_ID= +M365_APP_ID= TEAMSFX_M365_USER_NAME= \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/TeamsApp/launchSettings.json b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/launchSettings.json new file mode 100644 index 0000000000..06ce10109b --- /dev/null +++ b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/launchSettings.json @@ -0,0 +1,17 @@ +{ + "profiles": { + // Debug project within Teams + "Microsoft Teams (browser)": { + "commandName": "Project", + "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Microsoft 365 app (browser)": { + "commandName": "Project", + "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" + }, + "Outlook (browser)": { + "commandName": "Project", + "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" + } + } +} \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/teamsapp.local.yml b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.local.yml similarity index 75% rename from samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/teamsapp.local.yml rename to samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.local.yml index 01d049dbdd..514bdf6c2f 100644 --- a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/teamsapp.local.yml +++ b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.local.yml @@ -53,7 +53,7 @@ provision: # Generate runtime appsettings to JSON file - uses: file/createOrUpdateJsonFile with: - target: ./appsettings.json + target: ../MeetingTranscriptRecording/appsettings.json content: AzureAd: TenantId: ${{AAD_APP_TENANT_ID}} @@ -74,45 +74,40 @@ provision: - uses: teamsApp/validateManifest with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json + manifestPath: ./appPackage/manifest.json # Build Teams app package with latest env value - uses: teamsApp/zipAppPackage with: # Path to manifest template - manifestPath: ./AppManifest/manifest.json - outputZipPath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip - outputJsonPath: ./AppManifest/build/manifest.${{TEAMSFX_ENV}}.json + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json # Validate app package using validation rules - uses: teamsApp/validateAppPackage with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Apply the Teams app manifest to an existing Teams app in # Teams Developer Portal. # Will use the app id in manifest file to determine which Teams app to update. - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./AppManifest/build/AppManifest.${{TEAMSFX_ENV}}.zip + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Run npm command for client - uses: cli/runNpmCommand with: - workingDirectory: ./ClientApp + workingDirectory: ../MeetingTranscriptRecording/ClientApp args: install --no-audit - - # Create or update debug profile in lauchsettings file - - uses: file/createOrUpdateJsonFile + + # Extend your Teams app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 with: - target: ./Properties/launchSettings.json - content: - profiles: - Microsoft Teams (browser): - commandName: "Project" - dotnetRunMessages: true - launchBrowser: true - launchUrl: "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - applicationUrl: "https://localhost:44302;http://localhost:2544" - environmentVariables: - ASPNETCORE_ENVIRONMENT: "Development" - hotReloadProfile: "aspnetcore" \ No newline at end of file + # Relative path to the build app package. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + # Write the information of created resources into environment file for + # the specified environment variable(s). + writeToEnvironmentFile: + titleId: M365_TITLE_ID + appId: M365_APP_ID diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/teamsapp.yml b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.yml similarity index 100% rename from samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording/teamsapp.yml rename to samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.yml From c6705e9183e73ef73622e605c0ed5188873663da Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Thu, 2 May 2024 13:07:03 +0530 Subject: [PATCH 10/11] Updating Readme --- .../tab-meeting-transcript-recording/csharp/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/tab-meeting-transcript-recording/csharp/README.md b/samples/tab-meeting-transcript-recording/csharp/README.md index effced09ff..9b2140b823 100644 --- a/samples/tab-meeting-transcript-recording/csharp/README.md +++ b/samples/tab-meeting-transcript-recording/csharp/README.md @@ -36,9 +36,10 @@ This sample shows meeting transcripts and recordings. ## Run the app (Using Teams Toolkit for Visual Studio) The simplest way to run this sample in Teams is to use Teams Toolkit for Visual Studio. -1. Install Visual Studio 2022 **Version 17.8 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) +1. Install Visual Studio 2022 **Version 17.10 Preview 4 or higher** [Visual Studio](https://visualstudio.microsoft.com/downloads/) 1. Install Teams Toolkit for Visual Studio [Teams Toolkit extension](https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/toolkit-v4/install-teams-toolkit-vs?pivots=visual-studio-v17-7) -1. In Visual Studio, right-click your project and **Select Teams Toolkit > Prepare Teams App Dependencies** +1. In the debug dropdown menu of Visual Studio, select default startup project > **Microsoft Teams (browser)** +1. In Visual Studio, right-click your **TeamsApp** project and **Select Teams Toolkit > Prepare Teams App Dependencies** 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps. 1. Select **Debug > Start Debugging** or **F5** to run the menu in Visual Studio. 1. In the browser that launches, select the **Add** button to install the app to Teams. @@ -154,11 +155,11 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual **This step is specific to Teams:** -- **Edit** the `manifest.json` contained in the `AppManifest` folder to replace your Microsoft App Id `{{MicrosoftAppId}}` (that was created when you registered your bot earlier) *everywhere* you see the place holder string `{{MicrosoftAppId}}` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) +- **Edit** the `manifest.json` contained in the `AppPackage` folder to replace your Microsoft App Id `{{MicrosoftAppId}}` (that was created when you registered your bot earlier) *everywhere* you see the place holder string `{{MicrosoftAppId}}` (depending on the scenario the Microsoft App Id may occur multiple times in the `manifest.json`) - **Edit** the `manifest.json` for `{{domain-name}}` with base Url domain. E.g. if you are using ngrok it would be `https://1234.ngrok-free.app` then your domain-name will be `1234.ngrok-free.app` and if you are using dev tunnels then your domain will be like: `12345.devtunnels.ms`. -- **Zip** up the contents of the `AppManifest` folder to create a `manifest.zip` (Make sure that zip file does not contains any subfolder otherwise you will get error while uploading your .zip package) +- **Zip** up the contents of the `AppPackage` folder to create a `manifest.zip` (Make sure that zip file does not contains any subfolder otherwise you will get error while uploading your .zip package) - **Upload** the `manifest.zip` to Teams (In Teams Apps/Manage your apps click "Upload an app". Browse to and Open the .zip file. At the next dialog, click the Add button.) From 82547319e56d7441431d2300f2b3b148b091236c Mon Sep 17 00:00:00 2001 From: Harikrishnan Rajandiran Date: Fri, 10 May 2024 13:23:35 +0530 Subject: [PATCH 11/11] Update config file --- .../csharp/AdaptiveCardActions.slnLaunch.user | 30 ------------------- .../csharp/TeamsApp/env/.env.local | 4 +-- .../csharp/TeamsApp/launchSettings.json | 8 ----- .../csharp/TeamsApp/teamsapp.local.yml | 13 +------- .../BotDailyTaskReminder.slnLaunch.user | 30 ------------------- .../csharp/TeamsApp/env/.env.local | 4 +-- .../csharp/TeamsApp/launchSettings.json | 8 ----- .../csharp/TeamsApp/teamsapp.local.yml | 12 +------- .../csharp/BotFormattingCards.slnLaunch.user | 30 ------------------- .../csharp/TeamsApp/env/.env.local | 2 -- .../csharp/TeamsApp/launchSettings.json | 8 ----- .../csharp/TeamsApp/teamsapp.local.yml | 12 +------- .../MeetingTranscriptRecording.slnLaunch.user | 30 ------------------- .../csharp/TeamsApp/env/.env.local | 3 +- .../csharp/TeamsApp/launchSettings.json | 8 ----- .../csharp/TeamsApp/teamsapp.local.yml | 13 +------- .../csharp/TabRequestApproval.slnLaunch.user | 30 ------------------- .../csharp/TeamsApp/env/.env.local | 5 +--- .../csharp/TeamsApp/launchSettings.json | 8 ----- .../csharp/TeamsApp/teamsapp.local.yml | 12 +------- 20 files changed, 9 insertions(+), 261 deletions(-) diff --git a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.slnLaunch.user b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.slnLaunch.user index 18d85228f5..9be85571ff 100644 --- a/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.slnLaunch.user +++ b/samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions.slnLaunch.user @@ -13,35 +13,5 @@ "DebugTarget": "Microsoft Teams (browser)" } ] - }, - { - "Name": "Microsoft 365 app (browser)", - "Projects": [ - { - "Path": "AdaptiveCardActions\\AdaptiveCardActions.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Microsoft 365 app (browser)" - } - ] - }, - { - "Name": "Outlook (browser)", - "Projects": [ - { - "Path": "AdaptiveCardActions\\AdaptiveCardActions.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Outlook (browser)" - } - ] } ] \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/TeamsApp/env/.env.local b/samples/bot-adaptive-card-actions/csharp/TeamsApp/env/.env.local index 7c44d153e4..f6296d6224 100644 --- a/samples/bot-adaptive-card-actions/csharp/TeamsApp/env/.env.local +++ b/samples/bot-adaptive-card-actions/csharp/TeamsApp/env/.env.local @@ -22,6 +22,4 @@ BOT_ENDPOINT= BOT_DOMAIN= AZURE_SUBSCRIPTION_ID= -AZURE_RESOURCE_GROUP_NAME= -M365_TITLE_ID= -M365_APP_ID= \ No newline at end of file +AZURE_RESOURCE_GROUP_NAME= \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/TeamsApp/launchSettings.json b/samples/bot-adaptive-card-actions/csharp/TeamsApp/launchSettings.json index 06ce10109b..5687410386 100644 --- a/samples/bot-adaptive-card-actions/csharp/TeamsApp/launchSettings.json +++ b/samples/bot-adaptive-card-actions/csharp/TeamsApp/launchSettings.json @@ -4,14 +4,6 @@ "Microsoft Teams (browser)": { "commandName": "Project", "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Microsoft 365 app (browser)": { - "commandName": "Project", - "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Outlook (browser)": { - "commandName": "Project", - "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" } } } \ No newline at end of file diff --git a/samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.local.yml b/samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.local.yml index 71421015b8..5e95db54f8 100644 --- a/samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.local.yml +++ b/samples/bot-adaptive-card-actions/csharp/TeamsApp/teamsapp.local.yml @@ -80,15 +80,4 @@ provision: - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID \ No newline at end of file + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.slnLaunch.user b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.slnLaunch.user index 1a833d11fc..aca5cd37e8 100644 --- a/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.slnLaunch.user +++ b/samples/bot-daily-task-reminder/csharp/BotDailyTaskReminder.slnLaunch.user @@ -13,35 +13,5 @@ "DebugTarget": "Microsoft Teams (browser)" } ] - }, - { - "Name": "Microsoft 365 app (browser)", - "Projects": [ - { - "Path": "BotDailyTaskReminder\\BotDailyTaskReminder.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Microsoft 365 app (browser)" - } - ] - }, - { - "Name": "Outlook (browser)", - "Projects": [ - { - "Path": "BotDailyTaskReminder\\BotDailyTaskReminder.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Outlook (browser)" - } - ] } ] \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/TeamsApp/env/.env.local b/samples/bot-daily-task-reminder/csharp/TeamsApp/env/.env.local index 7c44d153e4..f6296d6224 100644 --- a/samples/bot-daily-task-reminder/csharp/TeamsApp/env/.env.local +++ b/samples/bot-daily-task-reminder/csharp/TeamsApp/env/.env.local @@ -22,6 +22,4 @@ BOT_ENDPOINT= BOT_DOMAIN= AZURE_SUBSCRIPTION_ID= -AZURE_RESOURCE_GROUP_NAME= -M365_TITLE_ID= -M365_APP_ID= \ No newline at end of file +AZURE_RESOURCE_GROUP_NAME= \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/TeamsApp/launchSettings.json b/samples/bot-daily-task-reminder/csharp/TeamsApp/launchSettings.json index 06ce10109b..5687410386 100644 --- a/samples/bot-daily-task-reminder/csharp/TeamsApp/launchSettings.json +++ b/samples/bot-daily-task-reminder/csharp/TeamsApp/launchSettings.json @@ -4,14 +4,6 @@ "Microsoft Teams (browser)": { "commandName": "Project", "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Microsoft 365 app (browser)": { - "commandName": "Project", - "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Outlook (browser)": { - "commandName": "Project", - "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" } } } \ No newline at end of file diff --git a/samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.local.yml b/samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.local.yml index e7b6e61a92..72297efb49 100644 --- a/samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.local.yml +++ b/samples/bot-daily-task-reminder/csharp/TeamsApp/teamsapp.local.yml @@ -81,14 +81,4 @@ provision: - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID \ No newline at end of file + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/BotFormattingCards.slnLaunch.user b/samples/bot-formatting-cards/csharp/BotFormattingCards.slnLaunch.user index aadb7cb6fb..66f7564825 100644 --- a/samples/bot-formatting-cards/csharp/BotFormattingCards.slnLaunch.user +++ b/samples/bot-formatting-cards/csharp/BotFormattingCards.slnLaunch.user @@ -13,35 +13,5 @@ "DebugTarget": "Microsoft Teams (browser)" } ] - }, - { - "Name": "Microsoft 365 app (browser)", - "Projects": [ - { - "Path": "BotFormattingCards\\BotFormattingCards.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Microsoft 365 app (browser)" - } - ] - }, - { - "Name": "Outlook (browser)", - "Projects": [ - { - "Path": "BotFormattingCards\\BotFormattingCards.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Outlook (browser)" - } - ] } ] \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/TeamsApp/env/.env.local b/samples/bot-formatting-cards/csharp/TeamsApp/env/.env.local index df72956614..893eabd06f 100644 --- a/samples/bot-formatting-cards/csharp/TeamsApp/env/.env.local +++ b/samples/bot-formatting-cards/csharp/TeamsApp/env/.env.local @@ -18,8 +18,6 @@ MICROSOFT_APP_TYPE= MICROSOFT_APP_TENANT_ID= AZURE_SUBSCRIPTION_ID= AZURE_RESOURCE_GROUP_NAME= -M365_TITLE_ID= -M365_APP_ID= diff --git a/samples/bot-formatting-cards/csharp/TeamsApp/launchSettings.json b/samples/bot-formatting-cards/csharp/TeamsApp/launchSettings.json index 06ce10109b..5687410386 100644 --- a/samples/bot-formatting-cards/csharp/TeamsApp/launchSettings.json +++ b/samples/bot-formatting-cards/csharp/TeamsApp/launchSettings.json @@ -4,14 +4,6 @@ "Microsoft Teams (browser)": { "commandName": "Project", "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Microsoft 365 app (browser)": { - "commandName": "Project", - "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Outlook (browser)": { - "commandName": "Project", - "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" } } } \ No newline at end of file diff --git a/samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.local.yml b/samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.local.yml index 40f65aee3c..37ca401d46 100644 --- a/samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.local.yml +++ b/samples/bot-formatting-cards/csharp/TeamsApp/teamsapp.local.yml @@ -80,14 +80,4 @@ provision: - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID \ No newline at end of file + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.slnLaunch.user b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.slnLaunch.user index 8eb638271e..d898a39475 100644 --- a/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.slnLaunch.user +++ b/samples/tab-meeting-transcript-recording/csharp/MeetingTranscriptRecording.slnLaunch.user @@ -13,35 +13,5 @@ "DebugTarget": "Microsoft Teams (browser)" } ] - }, - { - "Name": "Microsoft 365 app (browser)", - "Projects": [ - { - "Path": "MeetingTranscriptRecording\\MeetingTranscriptRecording.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Microsoft 365 app (browser)" - } - ] - }, - { - "Name": "Outlook (browser)", - "Projects": [ - { - "Path": "MeetingTranscriptRecording\\MeetingTranscriptRecording.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Outlook (browser)" - } - ] } ] \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/TeamsApp/env/.env.local b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/env/.env.local index bd5a321256..fd66eff684 100644 --- a/samples/tab-meeting-transcript-recording/csharp/TeamsApp/env/.env.local +++ b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/env/.env.local @@ -28,6 +28,5 @@ AAD_APP_ACCESS_AS_USER_PERMISSION_ID= -M365_TITLE_ID= -M365_APP_ID= + TEAMSFX_M365_USER_NAME= \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/TeamsApp/launchSettings.json b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/launchSettings.json index 06ce10109b..5687410386 100644 --- a/samples/tab-meeting-transcript-recording/csharp/TeamsApp/launchSettings.json +++ b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/launchSettings.json @@ -4,14 +4,6 @@ "Microsoft Teams (browser)": { "commandName": "Project", "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Microsoft 365 app (browser)": { - "commandName": "Project", - "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Outlook (browser)": { - "commandName": "Project", - "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" } } } \ No newline at end of file diff --git a/samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.local.yml b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.local.yml index 514bdf6c2f..7ec93d92e9 100644 --- a/samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.local.yml +++ b/samples/tab-meeting-transcript-recording/csharp/TeamsApp/teamsapp.local.yml @@ -99,15 +99,4 @@ provision: - uses: cli/runNpmCommand with: workingDirectory: ../MeetingTranscriptRecording/ClientApp - args: install --no-audit - - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID + args: install --no-audit \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TabRequestApproval.slnLaunch.user b/samples/tab-request-approval/csharp/TabRequestApproval.slnLaunch.user index 6f86d72419..7e5c5ea5be 100644 --- a/samples/tab-request-approval/csharp/TabRequestApproval.slnLaunch.user +++ b/samples/tab-request-approval/csharp/TabRequestApproval.slnLaunch.user @@ -13,35 +13,5 @@ "DebugTarget": "Microsoft Teams (browser)" } ] - }, - { - "Name": "Microsoft 365 app (browser)", - "Projects": [ - { - "Path": "TabRequestApproval\\TabRequestApproval.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Microsoft 365 app (browser)" - } - ] - }, - { - "Name": "Outlook (browser)", - "Projects": [ - { - "Path": "TabRequestApproval\\TabRequestApproval.csproj", - "Action": "Start", - "DebugTarget": "Start Project" - }, - { - "Path": "TeamsApp\\TeamsApp.ttkproj", - "Action": "StartWithoutDebugging", - "DebugTarget": "Outlook (browser)" - } - ] } ] \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TeamsApp/env/.env.local b/samples/tab-request-approval/csharp/TeamsApp/env/.env.local index 9cfb91994d..61f11757f3 100644 --- a/samples/tab-request-approval/csharp/TeamsApp/env/.env.local +++ b/samples/tab-request-approval/csharp/TeamsApp/env/.env.local @@ -28,7 +28,4 @@ AAD_APP_ACCESS_AS_USER_PERMISSION_ID= -TEAMSFX_M365_USER_NAME= - -M365_TITLE_ID= -M365_APP_ID= \ No newline at end of file +TEAMSFX_M365_USER_NAME= \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TeamsApp/launchSettings.json b/samples/tab-request-approval/csharp/TeamsApp/launchSettings.json index 06ce10109b..5687410386 100644 --- a/samples/tab-request-approval/csharp/TeamsApp/launchSettings.json +++ b/samples/tab-request-approval/csharp/TeamsApp/launchSettings.json @@ -4,14 +4,6 @@ "Microsoft Teams (browser)": { "commandName": "Project", "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Microsoft 365 app (browser)": { - "commandName": "Project", - "launchUrl": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&login_hint=${{TEAMSFX_M365_USER_NAME}}" - }, - "Outlook (browser)": { - "commandName": "Project", - "launchUrl": "https://outlook.office.com/host/${{M365_APP_ID}}?login_hint=${{TEAMSFX_M365_USER_NAME}}" } } } \ No newline at end of file diff --git a/samples/tab-request-approval/csharp/TeamsApp/teamsapp.local.yml b/samples/tab-request-approval/csharp/TeamsApp/teamsapp.local.yml index 623fc1f045..b579abb6d9 100644 --- a/samples/tab-request-approval/csharp/TeamsApp/teamsapp.local.yml +++ b/samples/tab-request-approval/csharp/TeamsApp/teamsapp.local.yml @@ -94,14 +94,4 @@ provision: - uses: teamsApp/update with: # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID \ No newline at end of file + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip \ No newline at end of file