I want to add an api key for my sendgrid account to Azure Automation account. I did the search but no luck.
How should I do this? Thank you in advance!
You could add your api key in password and set a related username(it does not verify the connection between username and password) like below:
Usually we use get a credential with Get-AutomationPSCredential and get its username and password
Get-AutomationPSCredential
$myCred = Get-AutomationPSCredential -Name 'MyCredential' $userName = $myCred.UserName $securePassword = $myCred.Password $password = $myCred.GetNetworkCredential().Password
For now, you need only to get the password which is sendgrid api key.
You could add your api key in password and set a related username(it does not verify the connection between username and password) like below:
Usually we use get a credential with
Get-AutomationPSCredential
and get its username and passwordFor now, you need only to get the password which is sendgrid api key.