last sync: 2020-Dec-03 15:30:53 UTC

Azure Policy definition

Shared dashboards should not have markdown tiles with inline content

Name Shared dashboards should not have markdown tiles with inline content
Azure Portal
Id 04c655fe-0ac7-48ae-9a32-3a2e208c7624
Version 1.0.0
details on versioning
Category Portal
Microsoft docs
Description Disallow creating a shared dashboard that has inline content in markdown tiles and enforce that the content should be stored as a markdown file that's hosted online. If you use inline content in the markdown tile, you cannot manage encryption of the content. By configuring your own storage, you can encrypt, double encrypt and even bring your own keys. Enabling this policy restricts users to use 2020-09-01-preview or above version of shared dashboards REST API.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Audit
Allowed: (Audit, Deny, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2020-11-10 16:00:42 add 04c655fe-0ac7-48ae-9a32-3a2e208c7624
Used in Initiatives none
Json
{
  "properties": {
    "displayName": "Shared dashboards should not have markdown tiles with inline content",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Disallow creating a shared dashboard that has inline content in markdown tiles and enforce that the content should be stored as a markdown file that's hosted online. If you use inline content in the markdown tile, you cannot manage encryption of the content. By configuring your own storage, you can encrypt, double encrypt and even bring your own keys. Enabling this policy restricts users to use 2020-09-01-preview or above version of shared dashboards REST API.",
    "metadata": {
      "version": "1.0.0",
      "category": "Portal"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "The effect determines what happens when the policy rule is evaluated to match"
        },
        "allowedValues": [
          "Audit",
          "Deny",
          "Disabled"
        ],
        "defaultValue": "Audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Portal/dashboards"
          },
          {
            "anyof": [
              {
                "not": {
                "value": "[requestContext().apiVersion]",
                  "greaterOrEquals": "2020-09-01-alpha"
                }
              },
              {
                "count": {
                "field": "Microsoft.Portal/dashboards/lenses[*].parts[*]",
                  "where": {
                    "allOf": [
                      {
                      "field": "Microsoft.Portal/dashboards/lenses[*].parts[*].metadata.type",
                        "equals": "Extension/HubsExtension/PartType/MarkdownPart"
                      },
                      {
                        "anyOf": [
                          {
                          "field": "Microsoft.Portal/dashboards/lenses[*].parts[*].metadata.Extension-HubsExtension-PartType-MarkdownPart.settings.content.settings.markdownUri",
                            "exists": "false"
                          },
                          {
                          "field": "Microsoft.Portal/dashboards/lenses[*].parts[*].metadata.Extension-HubsExtension-PartType-MarkdownPart.settings.content.settings.markdownSource",
                            "exists": "false"
                          },
                          {
                          "field": "Microsoft.Portal/dashboards/lenses[*].parts[*].metadata.Extension-HubsExtension-PartType-MarkdownPart.settings.content.settings.markdownSource",
                            "equals": "1"
                          }
                        ]
                      }
                    ]
                  }
                },
                "greater": 0
              }
            ]
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/04c655fe-0ac7-48ae-9a32-3a2e208c7624",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "04c655fe-0ac7-48ae-9a32-3a2e208c7624"
}