Skip to content

Commit 887fd41

Browse files
committed
minor edits
1 parent fa4173b commit 887fd41

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/automation/automation-connections.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ When you create a connection, you must specify a connection type. The connection
2727
Azure Automation makes the following built-in connection types available:
2828

2929
* `Azure` - Represents a connection used to manage classic resources.
30-
* `AzureServicePrincipal` - Represents a connection used to manage resources in Azuer using a service principal.
30+
* `AzureServicePrincipal` - Represents a connection used to manage resources in Azure using a service principal.
3131
* `AzureClassicCertificate` - This connection type is used to manage resources in Azure that were created using the classic deployment model that doesn't support Service Principal authentication.
3232

3333
## PowerShell cmdlets to access connections
@@ -81,7 +81,7 @@ Create a new connection with Windows PowerShell using the `New-AzAutomationConne
8181
You can use the following example commands to create a connection that can be used for authentication using Azure Service Principal.
8282

8383
```powershell
84-
$ConnectionAssetName = "AzureRunAsConnection"
84+
$ConnectionAssetName = "AzureConnection"
8585
$ConnectionFieldValues = @{"ApplicationId" = $Application.ApplicationId; "TenantId" = $TenantID.TenantId; "CertificateThumbprint" = $Cert.Thumbprint; "SubscriptionId" = $SubscriptionId}
8686
New-AzAutomationConnection -ResourceGroupName $ResourceGroup -AutomationAccountName $AutomationAccountName -Name $ConnectionAssetName -ConnectionTypeName AzureServicePrincipal -ConnectionFieldValues $ConnectionFieldValues
8787
```
@@ -143,16 +143,16 @@ def get_automation_credential(azure_connection):
143143
from msrestazure import azure_active_directory
144144
import adal
145145

146-
# Get the Azure Automation Run As service principal certificate
147-
cert = automationassets.get_automation_certificate("AzureRunAsCertificate")
146+
# Get the Azure Automation service principal certificate
147+
cert = automationassets.get_automation_certificate("MyCertificate")
148148
pks12_cert = crypto.load_pkcs12(cert)
149149
pem_pkey = crypto.dump_privatekey(
150150
crypto.FILETYPE_PEM, pks12_cert.get_privatekey())
151151

152152
# Get information for the Azure Automation service principal
153-
application_id = runas_connection["ApplicationId"]
154-
thumbprint = runas_connection["CertificateThumbprint"]
155-
tenant_id = runas_connection["TenantId"]
153+
application_id = my_connection["ApplicationId"]
154+
thumbprint = my_connection["CertificateThumbprint"]
155+
tenant_id = my_connection["TenantId"]
156156

157157
# Authenticate with service principal certificate
158158
resource = "https://management.core.windows.net/"

0 commit comments

Comments
 (0)