stack twitter tryhackme rss linkedin cross

Wilco van Esch

Skip to main content

Search results

    Fixing the "invalid signing key or OpenId metadata document" error" in Bot Builder

    When running a local emulation of a Microsoft Bot Builder chatbot, you might find that without making any changes to your code or dependencies you receive a new error.

    Example:

    > node app.js
    restify listening to http://[::]:3978
    ERROR: ChatConnector: receive - invalid signing key
    or OpenId metadata document.

    Check the version of the botbuilder framework you're using, and the version of the emulator you're using. In my case, the Bot Framework Channel Emulator seemed to have updated itself to v3.5.31 (latest version at the time), with the botbuilder library at v3.5.4 (latest version being 3.9.1 at the time).

    As of v3.5.31, the emulator uses a new authorisation endpoint. Microsoft's Bot Framework blog has more information on this change. To solve the problem, simply update the botbuilder library (Node.js: npm i botbuilder --save).

    After the update, we're back in business:

    > node app.js
    restify listening to http://[::]:3978
    ChatConnector: message received.