{"id":3375,"date":"2019-12-23T14:01:28","date_gmt":"2019-12-23T13:01:28","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=3375"},"modified":"2019-12-23T14:01:28","modified_gmt":"2019-12-23T13:01:28","slug":"programmatically-creating-an-azure-runas-account-with-your-automation-account","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2019\/12\/programmatically-creating-an-azure-runas-account-with-your-automation-account\/","title":{"rendered":"Programmatically creating an azure runas account with your automation account"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"538\" height=\"430\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/12\/2019-12-23-14_01_01-aan2oe5ajtfg6ew-Run-as-accounts-Microsoft-Azure.png\" alt=\"\" class=\"wp-image-3378\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/12\/2019-12-23-14_01_01-aan2oe5ajtfg6ew-Run-as-accounts-Microsoft-Azure.png 538w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/12\/2019-12-23-14_01_01-aan2oe5ajtfg6ew-Run-as-accounts-Microsoft-Azure-300x240.png 300w\" sizes=\"auto, (max-width: 538px) 100vw, 538px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As there is no ARM feature in  Azure yet to provision an automation runas account when provisioning automation accounts, I had to code something up to do this on the fly while we&#8217;re waiting for a <a rel=\"noreferrer noopener\" aria-label=\"Uservoice article (opens in a new tab)\" href=\"https:\/\/feedback.azure.com\/forums\/246290-automation\/suggestions\/18864241-creation-of-run-as-accounts-using-arm-template\" target=\"_blank\">Uservoice article<\/a> to get prioritized.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use my script in your pipeline to automatically provision a RunAs account. Note, the account credentials you use there should not be MFA protected or it will fail to log in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gitlab.com\/Lieben\/assortedFunctions\/blob\/master\/New-RunAsAccount.ps1\">https:\/\/gitlab.com\/Lieben\/assortedFunctions\/blob\/master\/New-RunAsAccount.ps1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As there is no ARM feature in Azure yet to provision an automation runas account when provisioning automation accounts, I had to code something up to do this on the fly while we&#8217;re waiting for a Uservoice article to get prioritized. Use my script in your pipeline to automatically provision a RunAs account. Note, the &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2019\/12\/programmatically-creating-an-azure-runas-account-with-your-automation-account\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Programmatically creating an azure runas account with your automation account<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-3375","post","type-post","status-publish","format-standard","hentry","category-azure"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=3375"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3375\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=3375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=3375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=3375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}