@Rachana Pole Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.
You can achieve this by setting property "Public Network Access": null through either ARM or Bicep Templates as called out here.
Also, as mentioned in this document here. If the setting (Public Network Access) isn't set (the property is null
), the default behavior is to enable access unless a private endpoint exists which changes the behavior to disable access. In the Azure portal, when the property isn't set, the radio button is also not set and you're then using default behavior.
To know more about the app service access restrictions, refer to this documentation.
Hope this helps, let me know if you have questions on this.