Skip to content

Commit 0dfd5e7

Browse files
authored
Merge pull request #195905 from SnehaSudhirG/22Apr-AddNote
Added note
2 parents 4ccfaf9 + 7050fef commit 0dfd5e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

articles/automation/automation-hrw-run-runbooks.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ Follow the next steps to use a managed identity for Azure resources on a Hybrid
109109
1. Replace it with `$AzureContext = (Connect-AzAccount -Identity -AccountId <ClientId>).context`, and
110110
1. Enter the Client ID.
111111
112+
>[!NOTE]
113+
>By default, the Azure contexts are saved for use between PowerShell sessions. It is possible that when a previous runbook on the Hybrid Runbook Worker has been authenticated with Azure, that context persists to the disk in the System PowerShell profile, as per [Azure contexts and sign-in credentials | Microsoft Docs](/powershell/azure/context-persistence?view=azps-7.3.2).
114+
For instance, a runbook with `Get-AzVM` can return all the VMs in the subscription with no call to `Connect-AzAccount`, and the user would be able to access Azure resources without having to authenticate within that runbook. You can disable context autosave in Azure PowerShell, as detailed [here](/powershell/azure/context-persistence?view=azps-7.3.2#save-azure-contexts-across-powershell-sessions).
115+
116+
112117
### Use runbook authentication with Run As account
113118
114119
Instead of having your runbook provide its own authentication to local resources, you can specify a Run As account for a Hybrid Runbook Worker group. To specify a Run As account, you must define a [credential asset](./shared-resources/credentials.md) that has access to local resources. These resources include certificate stores and all runbooks run under these credentials on a Hybrid Runbook Worker in the group.

0 commit comments

Comments
 (0)