How do I access the manifest.json in a Azure WebApp Bot generated using powershell?

Robin A 0 Reputation points
2023-12-05T18:26:46.2633333+00:00

I created and published an Azure WebApp Bot using the following document: https://learn.microsoft.com/en-us/azure/bot-service/powershell/bot-builder-powershell-quickstart?view=azure-bot-service-4.0

I need to now enable this bot for file upload to OneDrive, but the downloaded code does not contain a manifest.json. Do I need to add this manually? And if so, where do I put it and how to do I point to it?

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
751 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,100 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 46,991 Reputation points
    2023-12-05T21:44:37.9933333+00:00

    @Robin A Thanks for reaching out to us, please try to save it in the root of your project folder as manifest.json.

    The manifest.json file should be placed in the root directory of your bot source code. You can then reference the manifest.json file in your bot code by using the BotFrameworkAdapterSettings class. Here's an example of how to do this in C#:

    var adapter = new BotFrameworkAdapter(new BotFrameworkAdapterSettings
    {
        AppId = configuration["MicrosoftAppId"],
        AppPassword = configuration["MicrosoftAppPassword"],
        ChannelService = configuration["ChannelService"],
        OpenIdMetadata = new Uri(configuration["BotOpenIdMetadata"]),
        // Reference the manifest.json file here
        ManifestAppId = configuration["ManifestAppId"],
        ManifestEndpoint = configuration["ManifestEndpoint"]
    });
    

    In this example, the ManifestAppId and ManifestEndpoint properties are used to reference the manifest.json file. You will need to replace the configuration["ManifestAppId"] and configuration["ManifestEndpoint"] values with the appropriate values for your bot.

    Please have a try and let me know how it works.

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments