Home > Software engineering >  Subscription-id, resourceGroupName and name of the App from inside the web-app PowerShell
Subscription-id, resourceGroupName and name of the App from inside the web-app PowerShell

Time:07-14

I have an application hosted in Azure PAAS. The connection string for the application is stored under 'Configuration' -> 'Connection strings'

My application has a PowerShell instance. I want to iterate through all the Connection strings present under 'Configuration' -> 'Connection strings'

I have seen the enter image description here

If my understanding is correct as its your own application and if its publicly hosted then anyone will not be able to get the resource group name, application name(If you are using custom domain) or subscription details.

Alternatively, we can use the enter image description here For more information please refer the below links:-

CodePudding user response:

If you are going to use the REST API calls for your code, then the simple answer is just: No. I think in all cases the answer is going to be no honestly..

You can't drop those unique IDs, because those are required parameters to retrieve the correct data. If you want to make the code more generic, then you should write the code to retrieve the values for those parameters. Instead of hardcoding the values.

Your powershell code will always need to authenticate, or use a Managed Identity, and the identity used to authenticate will always have the subscriptionid as value in its object. As for the rest, well i think you get the gist of what im suggesting.

  • Related