User onPrem AD account to run AzureRM scripts creating VM

Hi,

Our organisation domain is trusted in Azure AD, I need to use a on prem ADaccount to run AzureRM scripts from on prem server, need help with how to setup the account so that script connects to AzureRM and works fine?

Thanks,

Kishor

Hi,

I found the answer mentioned in another forum;

https://social.technet.microsoft.com/Forums/en-US/ab43c55b-f9f8-41d0-b075-b7e2565471be/why-self-signed-cert-to-connect-sco-to-azure?forum=scogeneral#986119ca-ae17-4e9b-be53-f1317be8b847

Thanks,

Kishor

The biggest challenge that you’re going to have is that you need to authenticate to Azure before you can run the script, which also means that you need to store that credential securely somewhere. Do you have some kind of key management system on-prem that you can use to snag credentials from?

Another question, have you considered using Azure Automation (and its credential store) to run the scripts for you and then ship your output to wherever you need?

If Azure Automation (and the credential store) isnt a valid option, I’ve used this in the past for simple jobs that need the credentials stored:

https://www.pdq.com/blog/secure-password-with-powershell-encrypting-credentials-part-1/

https://www.pdq.com/blog/secure-password-with-powershell-encrypting-credentials-part-2/

Just make sure the key you generate is protected by NTFS permissions or something similar.