azure-cli

Update permissions for Azure DevOps group for EventSubscription through Azure CLI?

北战南征 提交于 2021-01-29 17:36:05
问题 I've been adding permissions to a custom Azure DevOps Services group through the Azure CLI (az devops version 0.11.0) and I've usually been able to do the following: az devops security permission namespace list , find namespaceId of specific namespace (like EventSubscription) Get the Project Admin's descriptor az devops security permission list --id $namespaceId --subject $projectAdmin.descriptor ... Find an allow bit in the ACES dictionary, find the respective token az devops security

Run Azure CLI Commands from a Azure Function APP

拟墨画扇 提交于 2021-01-29 16:31:17
问题 I need suggestions on how to use azure function app to create Web app in Azure under a resource group. Is there any way from azure function app can i invoke an azure CLI to create a Resource. Thanks in advance. 回答1: Azure function does not support Azure CLI now.At present, there are several Generally available and experimental languages in Azure Function. You can use Powershell instead. If you want to create resources using Azure functions, you can use the REST API to create resources and

pip error while installing azure cli extension behind proxy

半世苍凉 提交于 2021-01-29 14:30:27
问题 could someone help me please: I am using Azure cli behind proxy and I have fiddler running. I am running following commands and setup to login into my azure account, SET ADAL_PYTHON_NO_SSL_VERIFY=1 SET AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1 az login --tenant <company domain> It works well and gives me the list of subscriptions associated with my account.But, I need to install Azure-devops extension and when i run: az extension add --name azure-devops I am getting error: cli.azure.cli

Azure Function - trigger Python script containing Azure CLI commands

眉间皱痕 提交于 2021-01-29 04:04:55
问题 I have a python script for provisioning infrastructure in Azure - IaC. This script is using mostly the Python SDK, but is also running multiple Azure CLI commands - it is needed at times when I didn't find an equivalent command in the Python SDK. My goal is to trigger this script on-demand using Azure Functions. When testing the Azure Function locally, everything works fine as I have Azure CLI installed on my machine, however, when I publish it to Azure functions, I will run into an error

Is there a PowerShell equivalent to “az rest”?

点点圈 提交于 2021-01-28 13:51:40
问题 I recently discovered the az rest command, which allows me to perform authenticated REST commands, without having to worry about acquiring tokens. https://www.codeisahighway.com/native-azure-rest-api-calls-now-available-in-azure-cli-2-0-67/ az rest --method patch --url "https://graph.microsoft.com/v1.0/users/johndoe@azuresdkteam.onmicrosoft.com" --body "{\"displayName\": \"jondoe2\"}" Is there an equivalent in Azure Powershell? I need to do a call which is not available via any of the AzAd...

What's the use of a service principal without role assignment

我是研究僧i 提交于 2021-01-28 07:32:38
问题 Service principle can be created without role via az ad sp create-for-rbac --skip-assignment Q1. What's the use of a service principal without a role? Q2. Can a service principle exit without attaching to any scope/resource? If so what's the use of such independent service principle? 回答1: Q1. What's the use of a service principal without a role? The parameter --skip-assignment skip assigning the service principal to the subscription. So to be precise, your question should be without an RBAC

What's the use of a service principal without role assignment

假装没事ソ 提交于 2021-01-28 07:24:35
问题 Service principle can be created without role via az ad sp create-for-rbac --skip-assignment Q1. What's the use of a service principal without a role? Q2. Can a service principle exit without attaching to any scope/resource? If so what's the use of such independent service principle? 回答1: Q1. What's the use of a service principal without a role? The parameter --skip-assignment skip assigning the service principal to the subscription. So to be precise, your question should be without an RBAC

How to update Azure Application Gateway Path Based Rule UrlPathMap from .NET

巧了我就是萌 提交于 2021-01-28 07:19:27
问题 On Azure Portal, I am able to setup path-based rules which have some default setting, and a list of sub-rules (UrlPathMap). Each of those sub-rules has a name, paths, backend pool, and HTTP setting that have to be configured. As I can see I can update this map easily through Azure Portal. I want to be able to create such sub-rules dynamically from code as part of the application installation. I would prefer to do this directly from .NET (ASP.NET Core 3.1) application, but Azure CLI or Azure

az ad app permission add - Insufficient privileges to complete the operation

谁说我不能喝 提交于 2021-01-27 19:44:34
问题 I'm getting ERROR: Insufficient privileges to complete the operation. when running az ad app permission add What permission do I need to grant my service principal for this to work? I gave it the AppRoleAssignment.ReadWrite.All permission which says: Allows the app to manage permission grants for application permissions to any API (including Microsoft Graph) and application assignments for any app, on behalf of the signed-in user. Update: I also gave it Application.ReadWrite.All, but still

Azure Cli How to enable Application Insights for webapp

被刻印的时光 ゝ 提交于 2021-01-23 06:30:50
问题 Consider the following code. It creates an application insight, then it retrieves the instrumentationkey and assigns it to my webapp. az monitor app-insights component create -g $resourceGroup --app $webapp --application-type web --kind web --tags $defaultTags $instrumentationKey = az monitor app-insights component show -g $resourceGroup -a $webapp --query 'instrumentationKey' -o tsv az webapp config appsettings set -g $resourceGroup -n $webapp --settings APPINSIGHTS_INSTRUMENTATIONKEY=