page_type | description | products | languages | extensions | contentType | createdDate | ||||
---|---|---|---|---|---|---|---|---|---|---|
sample |
This sample illustrates how you programmatically manage lifecycle for your teams App in catalog by calling Microsoft Graph APIs. . |
|
|
samples |
07-07-2021 13:38:26 |
Bot Framework v4 AppCatalog sample.
This sample shows a AppCatalog bot and demonstrates teamsApp lifecycle in catalog followed by commands given to Bot.
- Microsoft Teams is installed and you have an account
- .NET Core SDK version 3.1
- ngrok or equivalent tunnelling solution
-
Clone the repository
git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
B) Or from Visual Studio code
- Launch Visual Studio code
- File -> Open Folder
- Navigate to
samples/graph-appcatalog-lifecycle/node
folder - Select
AppCatalogSample
folder - Press
F5
to run the project
-
In the Azure portal, select your resource group from the dashboard.
-
Select your bot channel registration link.
-
Open the resource page and select Configuration under Settings.
-
Select Add OAuth Connection Settings.
-
Complete the form as follows:
a. Name: Enter a name for the connection. You'll use this name in your bot in the appsettings.json file. For example BotTeamsAuthADv1.
b. Service Provider: Select Azure Active Directory. Once you select this, the Azure AD-specific fields will be displayed.
c. Client id: Enter the Application (client) ID that you recorded for your Azure identity provider app in the steps above.
d. Client secret: Enter the secret that you recorded for your Azure identity provider app in the steps above.
e. Grant Type: Enter authorization_code.
f. Login URL: Enter https://login.microsoftonline.com.
g. Tenant ID: enter the Directory (tenant) ID that you recorded earlier for your Azure identity app or common depending on the supported account type selected when you created the identity provider app. h. For Resource URL, enter https://graph.microsoft.com/ i. Provide Scopes like "AppCatalog.Submit, AppCatalog.Read.All, AppCatalog.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All"
A) Run ngrok - point to port 3978
```bash
ngrok http -host-header=rewrite 3978
- List all applications specific to the tenant : type "listapp" in chat and get all the app available in the same tenant.
- List applications with a given ID : type "app" in the chat and get deatils of app according to their appId.
- Find application based on the Teams app manifest ID : type "findapp" in the chat and get deatils of app according to their manifest Id.:
- List applications with a given ID, and return the submission review state: type "status" in the chat and get deatils of app either published or not.
- List the details of only those apps in the catalog that contain a bot: type "bot" in the chat and get deatils of available bot in appcatalog.
- type "publish" and upload the mainfest.zip of the teamsApp and app uploaded to appcatalog.
- type "update" and upload the mainfest.zip of the teamsApp and app updated to appcatalog against of the app id.