1

I have a MessageCard which I am sending to my Teams channel via the Incoming Webhook connector. This is working well. However, the card has the button with HttpPOST Action. In "target" I defined URL to my API in the format: "http://user:pass@address/resource/action.html?add2Queue=test". When I am trying to push button I am getting the error: "Target URL scheme 'http://user:pass@address/resource/action.html?add2Queue=test' is not allowed.". I didn't find any restrictions for using HTTP. I am using the "Incoming Webhook" connector.

Is it works with HTTP or only HTTPS?

JSON:

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "themeColor": "0076D7",
    "summary": "Action on environments status change",
    "sections": [{
        "activityTitle": "Envrionments status are going to change",
        "facts": [{
            "name": "Environment:",
            "value": "3"
        }, {
            "name": "Due date",
            "value": "On Friday 8:00 PM Central Time"
        }, {
            "name": "Pending Action",
            "value": "Environment are going to be stopped"
        }, {
            "name": "Notes",
            "value": "You can pause this action by pressing Pause button bellow"
        }],
        "markdown": true
    }],
    "potentialAction": [{
        "@type": "HttpPOST",
        "name": "Pause Action",
        "actions": [{
            "@type": "HttpPOST",
            "name": "Pause",
            "target": "http://user:pass@server/teamcity/httpAuth/action.html?add2Queue=Marlin_Infrastructure_MarlinInfrastructureStopStartEnvironments_TechnicalTasks_N"
        }]
    }]
}
14
  • Possible duplicate of Get "Target URL ... is not allowed" error message when actioning Outlook actionable message for external email user Commented Oct 2, 2019 at 22:46
  • Could you please check your connector registration is pending or approved? Pending connector's functionality is limited. Most cross tenant operations are blocked. Commented Oct 3, 2019 at 5:02
  • @Trinetra-MSFT I am using the "Incoming Webhook" connector. Does it have to be registered or addtionaly configured to use HTTP? Commented Oct 3, 2019 at 8:51
  • We are looking into this. Meanwhile, could you please confirm if you have enabled actions on your Connector cards in Connector Portal? Commented Oct 9, 2019 at 9:50
  • @Trinetra-MSFT The webhook connector is one of the standard connectors supported by Office 365 so I can't configure it. Commented Oct 13, 2019 at 17:59

1 Answer 1

3

Explanation of Teams sending a bearer authorization token can be found here
Based on that I did:

        "@type": "HttpPOST",
        "name": "Your Action",
        "target": "https://www.your-url.com",
        "headers": [
            {
                "name": "Authorization",
                "value": null
            }
        ],
        "body": "{\"whateverdata\"}"

and it worked for me. Works on Teams , I imagine it should work for outlook as well

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.