Custom Teams Office 365 Connector cannot be setup - office365connectors

The problem
I am trying to build a configurable team tab with a custom connector but having serious issues when the teams app is installed and try to configure the connector. I created tab apps and they work fine. But the connector, on its own or with a tab fails to config.
The connector custom configuration page is opened in a new window and shows the config page but the Teams SDK does not initialize. The microsoftTeams.initialize() function doesn't seem to do anything. Callbacks for functions like microsoftTeams.settings.setSettings(settings) and microsoftTeams.settings.getSettings() are never called.
I have tried dozens of samples and both node.js and csharp projects. I have tried building connectors in the teams app builder, yo teams, and VSCode Teams Toolkit. I even tried different versions of the teams SDK. Made no difference.
I read all the SO questions and Teams SDK github issues and none of those suggestions or solutions made a difference.
Does anyone know if custom created Office 365 Connectors still work in Teams or what I am doing wrong?
Could it be my sandbox teams/office environment?
Here is my configuration:
Created a sandbox Office/Teams dev environment with fake users + Azure per
the docs. I have not tried production Teams/Office yet.
Changed the Teams admin setting to allow sideloading
Created connector registration (created multiple times, not edited)
on outlook.office.com.
Created the connector config page (in a few
different ways) Hosted on ngrok (and azure - made no difference)
Uploaded app in "Manage Your Apps" -> "Upload Custom App"
Select a Team channel to install the app
Configured connector in the Team Channel
Clicked "Visit Site To Install" link
Config page opens but none of the Teams SDK works - I added console.log everywhere to verify
Manifest:
This is the default Quick scaffolded yo teams configurable tab and connector
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json",
"manifestVersion": "1.9",
"id": "c8012880-98bc-11ec-bee3-ab9042a78ecb",
"version": "1.0.1",
"packageName": "tabappl",
"developer": {
"name": "mytest",
"websiteUrl": "https://48fb-80-233-63-141.ngrok.io",
"privacyUrl": "https://48fb-80-233-63-141.ngrok.io/privacy.html",
"termsOfUseUrl": "https://48fb-80-233-63-141.ngrok.io/tou.html"
},
"name": {
"short": "tabappl",
"full": "tabappl"
},
"description": {
"short": "TODO: add short description here",
"full": "TODO: add full description here"
},
"icons": {
"outline": "icon-outline.png",
"color": "icon-color.png"
},
"accentColor": "#D85028",
"configurableTabs": [
{
"configurationUrl": "https://48fb-80-233-63-141.ngrok.io/tab1Tab/config.html?name={loginHint}&tenant={tid}&group={groupId}&theme={theme}",
"canUpdateConfiguration": true,
"scopes": [
"team"
]
}
],
"staticTabs": [],
"bots": [],
"connectors": [
{
"connectorId": "76a7925f-e99f-4d9e-970b-b1bee2390f2c",
"configurationUrl": "https://48fb-80-233-63-141.ngrok.io/tabapplConnector/config.html?name={loginHint}&tenant={tid}&group={groupId}&theme={theme}",
"scopes": [
"team"
]
}
],
"composeExtensions": [],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"https://48fb-80-233-63-141.ngrok.io"
],
"showLoadingIndicator": false
}
The connector registration manifest (exported from outlook.office.com reg)
Connector is just registered, not published
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json",
"manifestVersion": "1.3",
"id": "76a7925f-e99f-4d9e-970b-b1bee2390f2c",
"version": "1.0.0",
"packageName": "com.tabappCon2",
"developer": {
"name": "Developer",
"websiteUrl": "https://48fb-80-233-63-141.ngrok.io",
"privacyUrl": "https://48fb-80-233-63-141.ngrok.io",
"termsOfUseUrl": "https://48fb-80-233-63-141.ngrok.io"
},
"description": {
"full": "tabappCon2",
"short": "tabappCon2"
},
"icons": {
"outline": "https://outlook.office.com/connectors/Content/Images/IncomingWebhook.jpg",
"color": "https://outlook.office.com/connectors/Content/Images/IncomingWebhook.jpg"
},
"connectors": [
{
"connectorId": "76a7925f-e99f-4d9e-970b-b1bee2390f2c",
"scopes": [
"team"
],
"configurationUrl": "https://48fb-80-233-63-141.ngrok.io/tabapplConnector/config.html"
}
],
"name": {
"full": "tabappCon2",
"short": "tabappCon2"
},
"accentColor": "#FFFFFF",
"validDomains": [
"https://48fb-80-233-63-141.ngrok.io"
],
"needsIdentity": "true"
}

Related

Using ARM template to deploy WebJob

I am currently attempting to deploy a webjob as part of my app service through an ARM template. Does anyone have a sample of doing this through a zip deploy?
I have seen here and the linked question there about creating an arm template for a scheduled job but it was not completely clear on how to do it for continuous webjobs/how one would utilize zip deploy to deploy their files.
I currently have a section like this
{
"comments": "Defines an Azure Web App.",
"type": "Microsoft.Web/sites",
"name": "[parameters('siteName')]",
"apiVersion": "2015-08-01",
"location": "[variables('siteLocation')]",
"kind": "appservice",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]",
"ConfigJson",
"MdsConfigXml",
],
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]": "empty"
},
"properties": {
"sourcePlatform": "Unknown",
"targetPlatform": "Unknown",
"serverFarmId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('appServicePlanResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",
"siteConfig": {
"phpVersion": "off",
"scmType": null,
"netFrameworkVersion": "v4.0",
"use32BitWorkerProcess": false,
"webSocketsEnabled": false,
"alwaysOn": "[parameters('alwaysOn')]",
"httpLoggingEnabled": true,
"logsDirectorySizeLimit": 50,
"appSettings": [
{
"name": "APPINSIGHTS_PROFILERFEATURE_VERSION",
"value": "1.0.0",
"slotSetting": true
}
]
}
},
"resources": [
{
"apiVersion": "2018-02-01",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"name": "ZipDeploy",
"properties": {
"packageUri": "[parameters('deployPackageUrl')]"
},
"type": "extensions"
}
]
}
With the deployPackageURL linked to my zip file, which contains my webjob project. However when checking the app service resource, no webjob has been deployed. Can anyone point out possible errors in my ARM template? Thanks!
We can not deploy webjobs using ARM template.
If you just want to deploy Web App with a Scheduler Job, here is a sample for Scheduler Job Collection.
Here is the ways you could create WebJobs inside Web App.
Using the Azure portal.
Copying files directly in their proper location.
Deploying .NET Console WebJobs alongside an ASP.NET application
Deploying a WebJob using PowerShell ARM Cmdlets

How do I find which facebook messenger apps are linked with a facebook page through the facebook graph api?

I have been trying this out in the graph api explorer. Here are the steps I have been following:
Get a user access token with the permissions publish_actions, ads_management, manage_pages, publish_pages, pages_messaging, pages_messaging_phone_number, pages_messaging_subscriptions, pages_show_list, and user_events.
I GET the me/accounts endpoint and get this object:
{
"data": [
{
"access_token": "thisIsWhereTheAccessTokenGoes",
"category": "Shopping & Retail",
"category_list": [
{
"id": "200600219953504",
"name": "Shopping & Retail"
}
],
"name": "Some Page",
"id": "123456789",
"perms": [
"ADMINISTER",
"EDIT_PROFILE",
"CREATE_CONTENT",
"MODERATE_CONTENT",
"CREATE_ADS",
"BASIC_ADMIN"
]
}
],
"paging": {
"cursors": {
"before": "MTk1NDA4MDM2NDYyMDY5MAZDZD",
"after": "MTk1NDA4MDM2NDYyMDY5MAZDZD"
}
}
}
I copy the access token and page id from the above page object and paste it into the graph api explorer in the appropriate places.
I GET the endpoint {page-id}/subscribed_apps
I get this empty array:
{
"data": [
]
}
However if I go to my facebook app dashboard and go to the messenger settings and generate a page access token for the same page that I was getting in the graph api explorer, and then I paste that token into the explorer and get the {page-id}/subscribed_apps endpoint I actually get the app info that I was looking for. Something like this:
{
"data": [
{
"link": "https://www.facebook.com/games/?app_id=555555555555",
"name": "Test Messenger Bot",
"id": "555555555555"
}
]
}
I thought this could be because my app was in testing mode, but I tried to create a bot on chatfuel and linked it to the same facebook page and could not see that app listed under subscribed_apps either. I am thinking there is maybe some kind of permissions issue? I appreciate any help on this.

Create tagged vm instance snapshots

I'm trying to create snapshots of my vm instance on google cloud platform with a custom tag, but it's currently not working as expected. I'm sending the following Post request body to API referring to this documentation Google docs
{
"name":"<SnapshotName>",
"labels": {
"<LabelKey>":"<LabelValue>"
}
}
this gives me a positive 200 OK response, but no label appears.
{
"kind": "compute#operation",
"id": "<id>",
"name": "<name>",
"zone": "<Zone Link>",
"operationType": "createSnapshot",
"targetLink": "<Target Link>",
"targetId": "<Target ID>",
"status": "PENDING",
"user": "<User>",
"progress": 0,
"insertTime": "<Time>",
"selfLink": "<Self Link>"
}
additionally I tried to use syntax described in "Labeling Resources" documentation Google Labeling Resources
{
"name":"<SnapshotName>",
"labels": [{
"<Key>":"<LabelKey>"
"<Value>":"<LabelValue>"
}]
}
this gave me the same result.
In web interface it's possible to create snapshots and label it manually, but I would like to create them with a custom label via API.
Am I doing something wrong, or is it just broken?

List PowerBI workspace collection keys from arm template

When using ARM templates to deploy various Azure components you can use some functions. One of them is called listkeys and you can use it to return through the output the keys that were created during the deployment, for example when deploying a storage account.
Is there a way to get the keys when deploying a Power BI workspace collection?
According to you mentioned link, if we want to use listKeys function, then we need to know resourceName and ApiVersion.
From the Azure PowerBI workspace collection get access keys API, we could get resource name
Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName} and API version "2016-01-29"
So please have a try to use the follow coding, it works for me correctly.
"outputs": {
"exampleOutput": {
"value": "[listKeys(resourceId('Microsoft.PowerBI/workspaceCollections', parameters('workspaceCollections_tompowerBItest')), '2016-01-29')]",
"type": "object"
}
Check the created PowerBI Service from Azure portal
Whole ARM template I used:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspaceCollections_tompowerBItest": {
"defaultValue": "tomjustforbitest",
"type": "string"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.PowerBI/workspaceCollections",
"sku": {
"name": "S1",
"tier": "Standard"
},
"tags": {},
"name": "[parameters('workspaceCollections_tompowerBItest')]",
"apiVersion": "2016-01-29",
"location": "South Central US"
}
],
"outputs": {
"exampleOutput": {
"value": "[listKeys(resourceId('Microsoft.PowerBI/workspaceCollections', parameters('workspaceCollections_tompowerBItest')), '2016-01-29')]",
"type": "object"
}
}
}

Connect AWS CodeDeploy to Github without using my Github user?

AWS documentation describes how you authenticate to Github using your browser, and that you're currently logged into Github as a valid user with permission to the repository you want to deploy from:
http://docs.aws.amazon.com/codedeploy/latest/userguide/github-integ.html#github-integ-behaviors-auth
Is there any way to setup CodeDeploy without linking my user and having a browser? I'd love to do this using webhooks on each repository and AWS API calls, but I'll make a Github 'service user' if I have to.
More examples:
http://blogs.aws.amazon.com/application-management/post/Tx33XKAKURCCW83/Automatically-Deploy-from-GitHub-Using-AWS-CodeDeploy
I'd love to use webhooks on my repo, or set them up myself, than permit AWS access to every repository on my Github account.
There does not appear to be an alternative to doing the OAuth flow in your browser at this point. If you're concerned about opening your whole Github account up to Amazon, creating a service user is probably the best approach, unfortunately it seems this user still needs administrative access to your repos to set up the integration.
After more research I realized my first answer is wrong, you can use AWS CLI to create a CodePipeline using a Github OAuth token. Then you can plug in your CodeDeploy deployment from there. Here's an example configuration:
{
"pipeline": {
"roleArn": "arn:aws:iam::99999999:role/AWS-CodePipeline-Service",
"stages": [
{
"name": "Source",
"actions": [
{
"inputArtifacts": [],
"name": "Source",
"actionTypeId": {
"category": "Source",
"owner": "ThirdParty",
"version": "1",
"provider": "GitHub"
},
"outputArtifacts": [
{
"name": "MyApp"
}
],
"configuration": {
"Owner": "myusername",
"Repo": "myrepo",
"Branch": "master",
"OAuthToken": "**************"
},
"runOrder": 1
}
]
},
{
"name": "Beta",
"actions": [
{
"inputArtifacts": [
{
"name": "MyApp"
}
],
"name": "CodePipelineDemoFleet",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"version": "1",
"provider": "CodeDeploy"
},
"outputArtifacts": [],
"configuration": {
"ApplicationName": "CodePipelineDemoApplication",
"DeploymentGroupName": "CodePipelineDemoFleet"
},
"runOrder": 1
}
]
}
],
"artifactStore": {
"type": "S3",
"location": "codepipeline-us-east-1-99999999"
},
"name": "MySecondPipeline",
"version": 1
}
}
You can create the pipeline using the command:
aws codepipeline create-pipeline --cli-input-json file://input.json
Make sure that the Github OAuth token has permissions admin:repo_hook and repo.
Reference: http://docs.aws.amazon.com/cli/latest/reference/codepipeline/create-pipeline.html
CodeDeploy and Github integration works based on Github Oauth. So to use the CodeDeploy and Github integration, you will have to trust CodeDeploy github application using your github account. Currently this integration will only work in your browser with a valid github account cause CodeDeploy application will always redirect back to CodeDeploy console to verify&finish the OAuth authentication process.
You can do it using this bash command
FROM LOCAL TO REMOTE
rsync --delete -azvv -e "ssh -i /path/to/pem" /path/to/local/code/* ubuntu#66.66.66.66:/path/to/remote/code
FROM REMOTE TO LOCAL
rsync --delete -azvv -e "ssh -i /path/to/pem" ubuntu#66.66.66.66:/path/to/remote/code/* /path/to/local/code
rsync checks file versions and updates the files that need to be update