Skip to main content

Azure Az: Operation failed with status: 'Forbidden'. Details: 403 Client Error

I was trying to create a new resource group on Azure using a Shell script. An app registration was created followed by assigning the 'Contributor' role to the Service Principal. However, the az group create command repeatedly returned 403 Client errors. 

Operation failed with status: 'Forbidden'. Details: 403 Client Error: Forbidden for url: https://management.azure.com/subscriptions/<subscription id>/resourcegroups/rg-internal?api-version=2018-05-01


We suspected Service Principal permission issues and even elevated it as owner but that didn't help. Next, I tried using my personal account with contributor permissions to create the resource group but even that failed. That's when I suspected something is amiss and tried creating the resource group from the Azure Portal. It revealed the actual reason - 


Once I added the relevant tags, errors vanished and the resource group was instantly created. 

Moral: If commands don't work, wherever possible try the operation from Azure Portal.

Comments

Popular posts from this blog

Turning off a Dell Laptop Monitor: Keyboard shortcut(s)

I am someone who is particular about power savings and I don't leave appliances powered on when not in use. The same applies to computing devices - be it a smartphone or a PC/Laptop. I power off the desktop monitor when I step out for a tea break or hit Fn+F2 on my Lenovo laptop that turns off the display. Recently, I got a Dell Laptop and I was surprised to discover that Dell does not provide any shortcut to turn off the display. This led to some exploration and I found two ways to achieve that which are outlined below - 

Resolving INS-20802: Oracle Net Configuration Assistant failed error on Windows 10

I was all excited about the migration to Windows 10 until I had to install Oracle client 12.1.0.2 on it. The Oracle client installation used to fail miserably at the last stage with this error named INS-20802.

SSL VPN: Configuring and Using Forticlient on Ubuntu, creating a Launcher

Is your primary OS at home Linux and do you use Windows only to connect to your work PC over VPN or to attend meetings?  Do you often wish to connect to your work VPN from a Linux PC?  If your answer is 'Yes' to the above questions, I have an answer if your workplace uses Fortinet SSL VPN. Note that it's possible to connect to Fortinet and other VPNs like Cisco VPN from Linux through the inbuilt network manager by installing additional tools but this post would focus on using the standard Forticlient for accessing the resources on your work network. Obtaining Forticlient The most important thing to note w.r.t. using Forticlient for Ubuntu (or any Linux distro) is to note that the client is not publicly available for download from the official website. You will have to ask your IT department to download the client for you, in case they haven't provided it.