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

The ARM function listchannelwithkeys is not recognized as a valid function. #846

Closed
rjygraham opened this issue Jul 13, 2020 · 4 comments · Fixed by #860
Closed

The ARM function listchannelwithkeys is not recognized as a valid function. #846

rjygraham opened this issue Jul 13, 2020 · 4 comments · Fixed by #860

Comments

@rjygraham
Copy link

The function listchannelwithkeys is used with Bot Service channels to gain access to the channel secret key used to integrate into web applications, mobile apps, etc; however, it is not recognized as a valid function within the extension's intellisense.

This function is not documented in the list* page of the docs, but I've confirmed it with the bot engineering team and though testing. I've opened a GH issue for the docs as well:
MicrosoftDocs/azure-docs#58918

Not sure if the docs and this extension are both pulling from same metadata under the hood or not.

@StephenWeatherford
Copy link
Contributor

Thanks! Right now we don't have a good way of getting info on the available list* functions directly. Can you point me to a sample REST return value or its shape? Thx.

@rjygraham
Copy link
Author

Np. Here's an example output of executing the REST api call:

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/BOT/providers/Microsoft.BotService/botServices/mybot/channels/WebChatChannel/listchannelwithkeys?api-version=2018-07-12

{
    "resource": {
        "properties": {
            "sites": [
                {
                    "siteId": "e3e6D1xXXXX",
                    "siteName": "Default Site",
                    "key": "e3e6D1xXXXX.yI9JZOdH56z4EVzxxxx0xXXXxxx0xXXx0xxxxxXxXXx",
                    "key2": "e3e6D1xXXXX.NW_1AU4G7_K6leXXXxxx0xXxX0xXxXxxXxxx0Xx0XXx",
                    "isEnabled": true,
                    "isWebchatPreviewEnabled": true
                }
            ]
        },
        "etag": "W/\"e687068fb29c03a506e10a6bd83546647/13/2020 7:27:57 PM\"",
        "channelName": "WebChatChannel",
        "location": "global"
    },
    "setting": {
        "extensionKey1": "",
        "extensionKey2": "",
        "sites": [
            {
                "siteId": "e3e6D1xXXXX",
                "siteName": "Default Site",
                "key": "e3e6D1xXXXX.yI9JZOdH56z4EVzxxxx0xXXXxxx0xXXx0xxxxxXxXXx",
                "key2": "e3e6D1xXXXX.NW_1AU4G7_K6leXXXxxx0xXxX0xXxXxxXxxx0Xx0XXx",
                "isEnabled": true,
                "isV1Enabled": true,
                "isV3Enabled": true,
                "isWebchatPreviewEnabled": true,
                "isSecureSiteEnabled": false,
                "isBlockUserUploadEnabled": false,
                "eTag": "\"21003a32-0000-0000-0000-000000000000\""
            }
        ],
        "channelId": "webchat",
        "channelDisplayName": "Web Chat",
        "botId": "mybot",
        "botIconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png",
        "isEnabled": true
    },
    "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/BOT/providers/Microsoft.BotService/botServices/mybot/channels/WebChatChannel",
    "location": "global",
    "properties": {
        "properties": {
            "webChatEmbedCode": null,
            "sites": [
                {
                    "siteId": "e3e6D1xXXXX",
                    "siteName": "Default Site",
                    "key": "e3e6D1xXXXX.yI9JZOdH56z4EVzxxxx0xXXXxxx0xXXx0xxxxxXxXXx",
                    "key2": "e3e6D1xXXXX.NW_1AU4G7_K6leXXXxxx0xXxX0xXxXxxXxxx0Xx0XXx",
                    "isEnabled": true,
                    "isWebchatPreviewEnabled": true
                }
            ]
        },
        "etag": "W/\"e687068fb29c03a506e10a6bd83546647/13/2020 7:27:57 PM\"",
        "channelName": "WebChatChannel",
        "location": "global"
    },
    "provisioningState": "Accepted",
    "entityTag": "W/\"e687068fb29c03a506e10a6bd83546647/13/2020 7:27:57 PM\"",
    "changedTime": "0001-01-01T00:00:00Z"
}

The properties of interest is

properties.sites[0].key and properties.sites[0].key2

HTH

@StephenWeatherford
Copy link
Contributor

I think so, thanks!

@StephenWeatherford StephenWeatherford added this to the 0.11.1 milestone Jul 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants