App Service Access Restrictions Priority validation from Powershell RRS feed

  • Question

  • When I run powershell to add an IP Address restriction on an app service I cannot set a Priority lower than 100.

    Add-AzWebAppAccessRestrictionRule-ResourceGroupName "$rg" `

        -WebAppName "$appname" `

        -Name "a_name" `

        -Priority 10 `
        -Action Allow `
        -IpAddress xx.xx.xx.xx/32

    "Cannot validate argument on parameter 'Priority'. The 10 argument is less than the minimum allowed range of 100.  Supply an argument that is greater than or equal to 100 and then try the command again."

    Why does this validate the priority when I can set lower priorities through an ARM template and also manual entry of the restriction in the Azure portal?

    Bob - www.ContrivedExample.com

    • Edited by Molku Tuesday, January 14, 2020 8:10 PM
    Tuesday, January 14, 2020 8:10 PM

All replies

  • Hi Molku,

    Apologies for the delay in response. This is not normal strange behavior when setting the priority. Are you running the powershell cmdlet once and encountering this behavior or is this part of a deployment script that you run on a frequent basis? Also, is there a reason you would like to set the priority to 10?

    We will reach out to the engineer team internally to see what might be causing this strange behavior and update you when we get a response. 

    We appreciate your patience.



    Tuesday, January 21, 2020 10:49 PM
  • I'm running this from a .ps1 file in Visual Studio Code. It will be part of a set of utilities we can run easily. 

    I don't necessarily need a priority lower than 100, I was just following the rules that the infrastructure department was using. Their script was replacing properties instead of using this cmdlet so they never hit the problem.

    Bob - www.ContrivedExample.com

    Tuesday, January 21, 2020 11:39 PM