From 74e01f72d499b112e6232af46bbbc1c96d392d08 Mon Sep 17 00:00:00 2001 From: Ganeshrockz Date: Wed, 4 Nov 2020 14:37:05 +0530 Subject: [PATCH 1/3] Updated readme for no-subscriptions support --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 3a6a92ea..a3ec524f 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,29 @@ The following steps describe how to create the service principal, assign the rol NOTE: to manage service principals created with `az ad sp create-for-rbac`, visit the [Azure portal](https://portal.azure.com), navigate to your Azure Active Directory, then select **Manage** > **App registrations** on the left-hand menu. Your service principal should appear in the list. Select a principal to navigate to its properties. You can also manage role assignments using the [az role assignment](https://docs.microsoft.com/cli/azure/role/assignment?view=azure-cli-latest) command. +## Support for using `allow-no-subscriptions` flag with az login + +Capability has been added to support access to tenants without subscriptions. This can be useful to run tenant level commands, such as 'az ad'. The action accepts an optional parameter `allow-no-subscriptions` which is `false` by default. + +```yaml +# File: .github/workflows/workflow.yml + +on: [push] + +name: AzureLoginWithNoSubscriptions + +jobs: + + build-and-deploy: + runs-on: ubuntu-latest + steps: + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + allow-no-subscriptions: true +``` + # Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. From b85a20eae6693cb92bc896c6e507915de3f25ac8 Mon Sep 17 00:00:00 2001 From: Ganeshrockz Date: Wed, 4 Nov 2020 14:39:39 +0530 Subject: [PATCH 2/3] Minor changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a3ec524f..feced1f0 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ NOTE: to manage service principals created with `az ad sp create-for-rbac`, visi ## Support for using `allow-no-subscriptions` flag with az login -Capability has been added to support access to tenants without subscriptions. This can be useful to run tenant level commands, such as 'az ad'. The action accepts an optional parameter `allow-no-subscriptions` which is `false` by default. +Capability has been added to support access to tenants without subscriptions. This can be useful to run tenant level commands, such as `az ad`. The action accepts an optional parameter `allow-no-subscriptions` which is `false` by default. ```yaml # File: .github/workflows/workflow.yml From c246ac0b64028c8aca213c1fe69b9237069c57d0 Mon Sep 17 00:00:00 2001 From: Ganeshrockz Date: Wed, 4 Nov 2020 17:29:07 +0530 Subject: [PATCH 3/3] Updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index feced1f0..000fa7ee 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Get started today with a [free Azure account](https://azure.com/free/open-source With the Azure login Action, you can automate your workflow to do an Azure login using [Azure service principal](https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals) and run Azure CLI and Azure PowerShell scripts. -By default, the action only logs in with the Azure CLI (using the `az login` command). To log in with the Az PowerShell module, set `enable-AzPSSession` to true. +By default, the action only logs in with the Azure CLI (using the `az login` command). To log in with the Az PowerShell module, set `enable-AzPSSession` to true. To login to Azure tenants without any subscriptions, set the optional parameter `allow-no-subscriptions` to true. This repository contains GitHub Action for [Azure Login](https://github.com/Azure/login/blob/master/action.yml).