azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

Wrong Powershell example.

Open joostjansenskg opened this issue 3 years ago • 2 comments

On the website their is an powershell example:

{
  "displayName": "Name",
  "state": "enabled OR disabled OR enabledForReportingButNotEnforced",
  "conditions": {
    "applications": {
      "includeApplications": [
        "All"
      ]
    },
    "clientApplications": {
      "includeServicePrincipals": [
        "[Service principal Object ID] OR ServicePrincipalsInMyTenant"
      ],
      "excludeServicePrincipals": [
        "[Service principal Object ID]"
      ],
    },
    "locations": {
      "includeLocations": [
        "All"
      ],
      "excludeLocations": [
        "[Named location ID] OR AllTrusted"
      ]
    }
  },
  "grantControls": {
    "operator": "and",
    "builtInControls": [
      "block"
    ]
  }
}

But it contains a mistake. The last comma behind

 "excludeServicePrincipals": [
        "[Service principal Object ID]"
      ], 

Must be deleted.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

joostjansenskg avatar Nov 11 '22 12:11 joostjansenskg

#reassign:@MicrosoftGuyJFlo

So @joostjansenskg your recommendation is

{
  "displayName": "Name",
  "state": "enabled OR disabled OR enabledForReportingButNotEnforced",
  "conditions": {
    "applications": {
      "includeApplications": [
        "All"
      ]
    },
    "clientApplications": {
      "includeServicePrincipals": [
        "[Service principal Object ID] OR ServicePrincipalsInMyTenant"
      ],
      "excludeServicePrincipals": [
        "[Service principal Object ID]"
      ]
    },
    "locations": {
      "includeLocations": [
        "All"
      ],
      "excludeLocations": [
        "[Named location ID] OR AllTrusted"
      ]
    }
  },
  "grantControls": {
    "operator": "and",
    "builtInControls": [
      "block"
    ]
  }
}

MicrosoftGuyJFlo avatar Nov 11 '22 15:11 MicrosoftGuyJFlo

@joostjansenskg Thanks for your feedback! We will investigate and update as appropriate.

SaibabaBalapur-MSFT avatar Nov 11 '22 15:11 SaibabaBalapur-MSFT

@joostjansenskg Could you confirm on above ask from @MicrosoftGuyJFlo ?

YashikaTyagii avatar Nov 14 '22 07:11 YashikaTyagii

Yes correct.

joostjansenskg avatar Nov 14 '22 08:11 joostjansenskg

@MicrosoftGuyJFlo If you agree with this recommendation by @joostjansenskg. Please provide your feedback.

YashikaTyagii avatar Nov 14 '22 09:11 YashikaTyagii

#unassign:@YashikaTyagi-MSFT

MicrosoftGuyJFlo avatar Nov 14 '22 15:11 MicrosoftGuyJFlo

Resolving with a PR in our private repo

MicrosoftGuyJFlo avatar Nov 14 '22 15:11 MicrosoftGuyJFlo

#label:"assigned-to-author"

MicrosoftGuyJFlo avatar Nov 14 '22 15:11 MicrosoftGuyJFlo