Azure Managed App - ViewDefinition.json action with link to app

499 views Asked by At

We want to offer a link at the overview dashboard of a Azure Service Catalog/Marketplace App to jump to our custom WebApp (deployed as part of the app). Screenshot of overview dashboard with sample link

According to the documentation commands can be defined in the overview of the viewDefinition.json like:

{
    "kind": "Overview",
    "properties": {
        "header": "Welcome to your Azure Managed Application",
        "description": "This managed application is for demo purposes only.",
        "commands": [
            {
                "displayName": "Launch App",
                "path": "testAction",
                "icon": "Link"
            }
        ]
    }
}

Since we want to offer a (dynamic) link to the WebApp deployed as part of the managed app we would either need some information from the deployment (e.g. output from the CreateUiDefinition.json) or an option to retrieve such data within the viewDefinition.json to build a URL.

However even just providing a static link as path didn't work in our tests:

{
    "displayName": "Static Link",
    "path": "https://my-domain.com/", //<-- not working
    "icon": "Link"
}

According to documentation the path of a command can trigger a action on a custom resource provider. The resource provider can proxy the request to a custom service. This might work great if you want to e.g. offer a action to start/stop a service but since the proxy expects a JSON response from the service we can not simply display or redirect to our page. We also couldn't figure out how we could use the JSON response to set the path.

We would like to simply offer a command opening the link to our custom WebApp in a new tab or redirect to it. Does anyone know how we could achieve such a link?

We have seen Managed Apps on Azure like SendGrid providing such an option, so there must be an (undocumented) way. Screenshot of SendGrid App overview dashboard with link

Similar question: Opening a web app page using View Definition


UPDATE (2020-11-24):
We contacted the MS support and got the following response:

We got a confirmation from the product team, unfortunately, it is not possible to add the dynamic link at the summary page. This is because Custom actions are only designed to perform custom provider actions and not supposed to open hardcoded links etc.

1

There are 1 answers

1
Landysh Zinnatullina On

Opening an external link from the Managed application commands is not supported. However, you can have a link to the external websites in a description of the Managed application in the "Overview" page. The "description" property in the "Overview" page supports Markdown.

Example of URL like link:

Here is a link to the Azure Portal: <https://portal.azure.com/>

Which renders as:

Here is a link to the Azure Portal: https://portal.azure.com/

Example of named link:

Here is a named link to the Azure Portal: [Azure Portal](https://portal.azure.com/)

Which renders as:

Here is a named link to the Azure Portal: Azure Portal

Edit: Opening a dynamic link is currently not supported in Managed applications.