You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/automation/shared-resources/credentials.md
+10-13Lines changed: 10 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Credential assets in Azure Automation
2
+
title: Manage credential assets in Azure Automation
3
3
description: Credential assets in Azure Automation contain security credentials that can be used to authenticate to resources accessed by the runbook or DSC configuration. This article describes how to create credential assets and use them in a runbook or DSC configuration.
4
4
services: automation
5
5
ms.service: automation
@@ -10,11 +10,10 @@ ms.date: 01/31/2020
10
10
ms.topic: conceptual
11
11
manager: carmonm
12
12
---
13
-
# Credential assets in Azure Automation
14
13
15
-
An Automation credential asset holds an object that contains security credentials, such as a user name and a password. Runbooks and DSC configurations use cmdlets that accept a [PSCredential](https://docs.microsoft.com/dotnet/api/system.management.automation.pscredential?view=pscore-6.2.0) object for authentication. Alternatively, they can extract the user name and password of the `PSCredential` object to provide to some application or service requiring authentication.
14
+
# Manage credential assets in Azure Automation
16
15
17
-
Azure Automation securely stores the properties of a credential. Access to the properties through a runbook or DSC configuration uses the [Get-AutomationPSCredential](#activities-used-to-access-credentials) activity.
16
+
An Automation credential asset holds an object that contains security credentials, such as a user name and a password. Runbooks and DSC configurations use cmdlets that accept a [PSCredential](https://docs.microsoft.com/dotnet/api/system.management.automation.pscredential?view=pscore-6.2.0) object for authentication. Alternatively, they can extract the user name and password of the `PSCredential` object to provide to some application or service requiring authentication.
18
17
19
18
> [!NOTE]
20
19
> Secure assets in Azure Automation include credentials, certificates, connections, and encrypted variables. These assets are encrypted and stored in Azure Automation using a unique key that is generated for each Automation account. This key is stored in Key Vault. Before storing a secure asset, the key is loaded from Key Vault and then used to encrypt the asset.
@@ -41,13 +40,11 @@ The activities in the following table are used to access credentials in runbooks
41
40
42
41
| Activity | Description |
43
42
|:--- |:--- |
44
-
|`Get-AutomationPSCredential`|Gets a credential to use in a runbook or DSC configuration. The credential is in the form of a `PSCredential` object. |
43
+
|`Get-AutomationPSCredential`|Gets a credential to use in a runbook or DSC configuration. The credential is in the form of a `PSCredential` object. For more about the cmdlet corresponding to this activity, see [Module assets in Azure Automation](modules.md). |
45
44
|[Get-Credential](https://docs.microsoft.com/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7)|Gets a credential with a prompt for user name and password. |
46
45
|[New-AzureAutomationCredential](https://docs.microsoft.com/powershell/module/servicemanagement/azure/new-azureautomationcredential?view=azuresmps-4.0.0)| Creates a credential asset. |
47
46
48
-
For local development using the Azure Automation Authoring Toolkit, the `Get-AutomationPSCredential` cmdlet is part of assembly [AzureAutomationAuthoringToolkit](https://www.powershellgallery.com/packages/AzureAutomationAuthoringToolkit/0.2.3.9). For Azure working with the Automation context, the cmdlet is in `Orchestrator.AssetManagement.Cmdlets`. See [Manage modules in Azure Automation](modules.md).
49
-
50
-
To retrieve `PSCredential` objects in your code, you can install the [Microsoft Azure Automation ISE add-on for the PowerShell ISE](https://github.com/azureautomation/azure-automation-ise-addon).
47
+
To retrieve `PSCredential` objects in your code, you can install the Microsoft Azure Automation ISE add-on for the PowerShell ISE. For more information, see [Module assets in Azure Automation](modules.md).
> You should avoid using variables in the `Name` parameter of `Get-AutomationPSCredential`. Their use can complicate discovery of dependencies between runbooks or DSC configurations and credential assets at design time.
64
61
65
-
## Python2 functions that access credentials
62
+
## Python 2 functions that access credentials
66
63
67
-
The function in the following table is used to access credentials in a Python2 runbook.
64
+
The function in the following table is used to access credentials in a Python 2 runbook.
68
65
69
66
| Function | Description |
70
67
|:---|:---|
@@ -151,9 +148,9 @@ The following image shows an example of using a credential in a graphical runboo
151
148
152
149
While DSC configurations in Azure Automation can work with credential assets using `Get-AutomationPSCredential`, they can also pass credential assets via parameters. For more information, see [Compiling configurations in Azure Automation DSC](../automation-dsc-compile.md#credential-assets).
153
150
154
-
## Using credentials in Python2
151
+
## Using credentials in Python 2
155
152
156
-
The following example shows an example of accessing credentials in Python2 runbooks.
153
+
The following example shows an example of accessing credentials in Python 2 runbooks.
157
154
158
155
159
156
```python
@@ -172,4 +169,4 @@ print cred["password"]
172
169
* To understand the different authentication methods for Automation, see [Azure Automation Security](../automation-security-overview.md).
173
170
* To get started with graphical runbooks, see [My first graphical runbook](../automation-first-runbook-graphical.md).
174
171
* To get started with PowerShell workflow runbooks, see [My first PowerShell workflow runbook](../automation-first-runbook-textual.md).
175
-
* To get started with Python2 runbooks, see [My first Python2 runbook](../automation-first-runbook-textual-python2.md).
172
+
* To get started with Python 2 runbooks, see [My first Python 2 runbook](../automation-first-runbook-textual-python2.md).
0 commit comments