Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated TeamsJS CC Matrix App #2074

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/teamsjs-cc-app/.storageignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aad.manifest.*.json
109 changes: 109 additions & 0 deletions apps/teamsjs-cc-app/aad.manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"id": "${{AAD_APP_OBJECT_ID}}",
"appId": "${{AAD_APP_CLIENT_ID}}",
"name": "${{CONFIG__MANIFEST__APPNAME__SHORT}}-aad",
"accessTokenAcceptedVersion": 2,
"signInAudience": "AzureADMyOrg",
"optionalClaims": {
"idToken": [],
"accessToken": [
{
"name": "idtyp",
"source": null,
"essential": false,
"additionalProperties": []
}
],
"saml2Token": []
},
"requiredResourceAccess": [
{
"resourceAppId": "Microsoft Graph",
"resourceAccess": [
{
"id": "User.Read",
"type": "Scope"
}
]
}
],
"oauth2Permissions": [
{
"adminConsentDescription": "Allows Teams to call the app's web APIs as the current user.",
"adminConsentDisplayName": "Teams can access app's web APIs",
"id": "${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}",
"isEnabled": true,
"type": "User",
"userConsentDescription": "Enable Teams to call this app's web APIs with the same rights that you have",
"userConsentDisplayName": "Teams can access app's web APIs and make requests on your behalf",
"value": "access_as_user"
}
],
"preAuthorizedApplications": [
{
"appId": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
},
{
"appId": "5e3ce6c0-2b1f-4285-8d4b-75ee78787346",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
},
{
"appId": "d3590ed6-52b3-4102-aeff-aad2292ab01c",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
},
{
"appId": "00000002-0000-0ff1-ce00-000000000000",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
},
{
"appId": "bc59ab01-8403-45c6-8796-ac3ef710b3e3",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
},
{
"appId": "0ec893e0-5785-4de6-99da-4ed124e5296c",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
},
{
"appId": "4765445b-32c6-49b0-83e6-1d93765276ca",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
},
{
"appId": "4345a7b9-9a63-4910-a426-35363201d503",
"permissionIds": [
"${{AAD_APP_ACCESS_AS_USER_PERMISSION_ID}}"
]
}
],
"identifierUris": [
"api://${{TAB_DOMAIN}}/${{AAD_APP_CLIENT_ID}}"
],
"replyUrlsWithType": [
{
"url": "${{TAB_ENDPOINT}}/auth-end.html",
"type": "Web"
},
{
"url": "${{TAB_ENDPOINT}}/auth-end.html?clientId=${{AAD_APP_CLIENT_ID}}",
"type": "Spa"
},
{
"url": "${{TAB_ENDPOINT}}/blank-auth-end.html",
"type": "Spa"
}
]
}
121 changes: 121 additions & 0 deletions apps/teamsjs-cc-app/appPackage/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"manifestVersion": "1.16",
"version": "1.0.2",
"id": "${{TEAMS_APP_ID}}",
"packageName": "com.microsoft.teams.extension",
Copy link
Contributor

Choose a reason for hiding this comment

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

com.microsoft.teams.extension

Is there a more specific name you can use for this?

"developer": {
"name": "Teams App, Inc.",
"websiteUrl": "${{TAB_ENDPOINT}}/index.html",
"privacyUrl": "${{TAB_ENDPOINT}}/index.html#/privacy",
"termsOfUseUrl": "${{TAB_ENDPOINT}}/index.html#/termsofuse"
},
"icons": {
"color": "${{CONFIG__MANIFEST__ICONS__COLOR}}",
"outline": "${{CONFIG__MANIFEST__ICONS__OUTLINE}}"
},
"name": {
"short": "${{CONFIG__MANIFEST__APPNAME__SHORT}}",
"full": "${{CONFIG__MANIFEST__APPNAME__FULL}}"
},
"description": {
"short": "${{CONFIG__MANIFEST__DESCRIPTION__SHORT}}",
"full": "${{CONFIG__MANIFEST__DESCRIPTION__FULL}}"
},
"accentColor": "#FFFFFF",
"configurableTabs": [
{
"configurationUrl": "${{TAB_ENDPOINT}}/index.html#/config",
"canUpdateConfiguration": true,
"scopes": [
"team",
"groupchat"
],
"context": [
"channelTab",
"meetingChatTab",
"meetingDetailsTab",
"meetingSidePanel",
"meetingStage"
],
"meetingSurfaces": [
"sidePanel",
"stage"
]
}
],
"bots": [],
"composeExtensions": [],
"staticTabs": [
{
"entityId": "index0",
"name": "Capabilities",
"contentUrl": "${{TAB_ENDPOINT}}/index.html#/tab",
"websiteUrl": "${{TAB_ENDPOINT}}/index.html#/tab",
"scopes": [
"personal",
"team"
]
},
{
"entityId": "pagesTab",
"name": "Pages",
"contentUrl": "${{TAB_ENDPOINT}}/index.html#/pagesTab",
"websiteUrl": "${{TAB_ENDPOINT}}/index.html#/pagesTab",
"scopes": [
"personal",
"team"
]
},
{
"entityId": "meetings",
"name": "Meetings",
"contentUrl": "${{TAB_ENDPOINT}}/index.html#/meetings",
"websiteUrl": "${{TAB_ENDPOINT}}/index.html#/meetings",
"scopes": [
"personal",
"team"
]
}
],
"authorization": {
"permissions": {
"resourceSpecific": [
{
"name": "MeetingStage.Write.Chat",
"type": "Delegated"
},
{
"name": "ChannelMeetingStage.Write.Group",
"type": "Delegated"
},
{
"name": "InAppPurchase.Allow.User",
"type": "Delegated"
},
{
"name": "SearchQuery.Read.User",
"type": "Delegated"
}
]
}
},
"permissions": [
"identity",
"messageTeamMembers"
],
"devicePermissions": [
"geolocation",
"media",
"notifications",
"midi",
vikramtha marked this conversation as resolved.
Show resolved Hide resolved
"openExternal"
],
"validDomains": [
"${{TAB_DOMAIN}}"
],
"webApplicationInfo": {
"id": "${{AAD_APP_CLIENT_ID}}",
"resource": "api://${{TAB_DOMAIN}}/${{AAD_APP_CLIENT_ID}}"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/teamsjs-cc-app/appPackage/resources/outline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions apps/teamsjs-cc-app/env/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file includes environment variables that will be committed to git by default.
TEAMSFX_ENV=dev
CONFIG__MANIFEST__APPNAME__SHORT=TeamsJSCapabilityChecker
CONFIG__MANIFEST__APPNAME__FULL=TeamsJS Capability Checker
CONFIG__MANIFEST__DESCRIPTION__SHORT=Capabilities Matrix Sample App
CONFIG__MANIFEST__DESCRIPTION__FULL=Sample application to demonstrate the capabilities of TeamsJS in Microsoft Teams apps extended across Outlook and Microsoft 365. For more information visit [SDK documentation page](https://learn.microsoft.com/en-us/javascript/api/overview/msteams-client?view=msteams-client-js-latest&tabs=npm)
CONFIG__MANIFEST__ICONS__COLOR=resources/color.png
CONFIG__MANIFEST__ICONS__OUTLINE=resources/outline.png

RESOURCE_SUFFIX=
AZURE_SUBSCRIPTION_ID=
AZURE_RESOURCE_GROUP_NAME=
AAD_APP_CLIENT_ID=
AAD_APP_OBJECT_ID=
AAD_APP_TENANT_ID=
AAD_APP_OAUTH_AUTHORITY=
AAD_APP_OAUTH_AUTHORITY_HOST=
TEAMS_APP_ID=
TEAMS_APP_TENANT_ID=
TAB_AZURE_STORAGE_RESOURCE_ID=
TAB_DOMAIN=
TAB_ENDPOINT=
API_FUNCTION_ENDPOINT=
API_FUNCTION_RESOURCE_ID=
AAD_APP_ACCESS_AS_USER_PERMISSION_ID=
M365_TITLE_ID=
M365_APP_ID=
21 changes: 21 additions & 0 deletions apps/teamsjs-cc-app/env/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
TEAMSFX_ENV=local
CONFIG__MANIFEST__APPNAME__SHORT=TeamsJSCapabilityChecker
CONFIG__MANIFEST__APPNAME__FULL=TeamsJS Capability Checker
CONFIG__MANIFEST__DESCRIPTION__SHORT=Capabilities Matrix Sample App
CONFIG__MANIFEST__DESCRIPTION__FULL=Sample application to demonstrate the capabilities of TeamsJS in Microsoft Teams apps extended across Outlook and Microsoft 365. For more information visit [SDK documentation page](https://learn.microsoft.com/en-us/javascript/api/overview/msteams-client?view=msteams-client-js-latest&tabs=npm)
CONFIG__MANIFEST__ICONS__COLOR=resources/color.png
CONFIG__MANIFEST__ICONS__OUTLINE=resources/outline.png
AAD_APP_CLIENT_ID=
AAD_APP_OBJECT_ID=
AAD_APP_TENANT_ID=
AAD_APP_OAUTH_AUTHORITY=
AAD_APP_OAUTH_AUTHORITY_HOST=
TEAMS_APP_ID=
TEAMS_APP_TENANT_ID=
AAD_APP_ACCESS_AS_USER_PERMISSION_ID=
M365_TITLE_ID=
M365_APP_ID=
SSL_CRT_FILE=
SSL_KEY_FILE=
TAB_DOMAIN=
TAB_ENDPOINT=
26 changes: 26 additions & 0 deletions apps/teamsjs-cc-app/infra/azure.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
param resourceBaseName string
param storageSKU string
param storageName string = resourceBaseName
param location string = resourceGroup().location


// Azure Storage that hosts your static web site
resource storage 'Microsoft.Storage/storageAccounts@2021-06-01' = {
kind: 'StorageV2'
location: location
name: storageName
properties: {
supportsHttpsTrafficOnly: true
}
sku: {
name: storageSKU
}
}

var siteDomain = replace(replace(storage.properties.primaryEndpoints.web, 'https://', ''), '/', '')
var tabEndpoint = 'https://${siteDomain}'

// The output will be persisted in .env.{envName}. Visit https://aka.ms/teamsfx-actions/arm-deploy for more details.
output TAB_AZURE_STORAGE_RESOURCE_ID string = storage.id // used in deploy stage
output TAB_DOMAIN string = siteDomain
output TAB_ENDPOINT string = tabEndpoint
12 changes: 12 additions & 0 deletions apps/teamsjs-cc-app/infra/azure.parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceBaseName": {
"value": "teamsjschecker${{RESOURCE_SUFFIX}}"
},
"storageSKU": {
"value": "Standard_LRS"
}
}
}