Office 365 for IT Pros eBook<\/a> bundle.<\/p>\n\n\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"
If you can’t use managed identities, credential resources are a way to manage username and password credentials for Azure Automation runbooks. The Secret Management module is an alternative, and it\u2019s a good option to manage credentials that are shared between interactive scripts and automation runbooks. This article describes how to use the Secret Management PowerShell module to fetch credentials stored in Azure Key Vault for use in an automation runbook.<\/p>\n","protected":false},"author":1,"featured_media":71142,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[496892716,496892313],"tags":[496894534,496894453,496894425,496892316,496896091],"class_list":["post-71132","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-powershell","tag-azure-automation","tag-azure-key-vault","tag-credentials","tag-powershell","tag-secret-management"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/10\/Secret-Management-for-Azure-Automation.png?fit=1200%2C628&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pa9OTa-ivi","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":56514,"url":"https:\/\/office365itpros.com\/2022\/08\/15\/azure-key-vault-powershell\/","url_meta":{"origin":71132,"position":0},"title":"Using Azure Key Vault with Microsoft 365 PowerShell","author":"Tony Redmond","date":"August 15, 2022","format":false,"excerpt":"A previous article explains how to use an Azure Automation runbook to write information to a SharePoint Online site and Teams channel. At the time, I used a stored credential to authenticate and access SharePoint and Teams. Azure Key Vault offers another way to store secrets (bits of information) securely.\u2026","rel":"","context":"In "Azure"","block_context":{"text":"Azure","link":"https:\/\/office365itpros.com\/category\/azure\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/08\/Key-Vault-Interactive-PowerShell.jpg?fit=1200%2C521&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/08\/Key-Vault-Interactive-PowerShell.jpg?fit=1200%2C521&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/08\/Key-Vault-Interactive-PowerShell.jpg?fit=1200%2C521&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/08\/Key-Vault-Interactive-PowerShell.jpg?fit=1200%2C521&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/08\/Key-Vault-Interactive-PowerShell.jpg?fit=1200%2C521&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":70259,"url":"https:\/\/office365itpros.com\/2025\/08\/12\/connect-ippssession-azure\/","url_meta":{"origin":71132,"position":1},"title":"Maintaining a Microsoft 365 Retention Policy with PowerShell","author":"Tony Redmond","date":"August 12, 2025","format":false,"excerpt":"The Connect-IPPSSession cmdlet is needed to connect to the Security and Compliance endpoint to update a Microsoft 365 retention policy. Unhappily, the Security and Compliance module doesn\u2019t support managed identities, which makes it harder to run Connect-IPPSSession securely in an Azure Automation runbook. In the end, we use a credential\u2026","rel":"","context":"In "Exchange Online"","block_context":{"text":"Exchange Online","link":"https:\/\/office365itpros.com\/category\/exchange-online\/"},"img":{"alt_text":"Connect-IPPSSession with Azure Automation","src":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/08\/Connect-IPPSSession.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/08\/Connect-IPPSSession.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/08\/Connect-IPPSSession.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/08\/Connect-IPPSSession.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/08\/Connect-IPPSSession.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":67863,"url":"https:\/\/office365itpros.com\/2025\/01\/29\/use-hve-with-azure-automation\/","url_meta":{"origin":71132,"position":2},"title":"Primer: Using Exchange High Volume Email with Azure Automation","author":"Tony Redmond","date":"January 29, 2025","format":false,"excerpt":"This article covers how to use HVE with Azure Automation to send email. HVE is Exchange Online's High Volume Email solution for internal communications. In the discussion, we cover how to retrieve credentials from Azure Key Vault, how to retrieve data from a web page, and how to bring everything\u2026","rel":"","context":"In "Exchange Online"","block_context":{"text":"Exchange Online","link":"https:\/\/office365itpros.com\/category\/exchange-online\/"},"img":{"alt_text":"Use HVE with Azure Automation","src":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Use-HVE-with-Azure-Automation.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Use-HVE-with-Azure-Automation.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Use-HVE-with-Azure-Automation.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Use-HVE-with-Azure-Automation.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Use-HVE-with-Azure-Automation.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":57735,"url":"https:\/\/office365itpros.com\/2022\/11\/03\/teams-policy-assignment-azureauto\/","url_meta":{"origin":71132,"position":3},"title":"Upgrade of Teams Policy Cmdlets Enables Use in Azure Automation","author":"Tony Redmond","date":"November 3, 2022","format":false,"excerpt":"This article explains how to make Teams policy assignments using an Azure Automation runbook and some of the modernized cmdlets available in the Teams PowerShell module. Not everything worked as smoothly as we'd like, but like most PowerShell scenarios, there's usually a workaround available to get the job done. It\u2026","rel":"","context":"In "PowerShell"","block_context":{"text":"PowerShell","link":"https:\/\/office365itpros.com\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/11\/Azure-Automation-Teams-Policies.jpg?fit=1200%2C719&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/11\/Azure-Automation-Teams-Policies.jpg?fit=1200%2C719&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/11\/Azure-Automation-Teams-Policies.jpg?fit=1200%2C719&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/11\/Azure-Automation-Teams-Policies.jpg?fit=1200%2C719&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2022\/11\/Azure-Automation-Teams-Policies.jpg?fit=1200%2C719&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":57460,"url":"https:\/\/office365itpros.com\/2022\/10\/19\/teams-administrator-permission-apps\/","url_meta":{"origin":71132,"position":4},"title":"Assigning Permissions to Entra ID Apps to Use the Microsoft Teams PowerShell Module","author":"Tony Redmond","date":"October 19, 2022","format":false,"excerpt":"Before an app or an Azure Automation account can use the Teams PowerShell cmdlets in a script or runbook, it must have the permission to act as an administrator. In this article, we cover how to assign the necessary role to a service principal.","rel":"","context":"In "Azure"","block_context":{"text":"Azure","link":"https:\/\/office365itpros.com\/category\/azure\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2019\/10\/Teams-Logo.jpg?fit=640%2C427&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2019\/10\/Teams-Logo.jpg?fit=640%2C427&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2019\/10\/Teams-Logo.jpg?fit=640%2C427&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":67742,"url":"https:\/\/office365itpros.com\/2025\/01\/21\/azure-automation-runbook-primer\/","url_meta":{"origin":71132,"position":5},"title":"Primer: How to Use Azure Automation to Run Microsoft Graph PowerShell SDK Scripts","author":"Tony Redmond","date":"January 21, 2025","format":false,"excerpt":"A reader asked why it seems so difficult to use Azure Automation runbooks to process Microsoft 365 data. In fact, it's not so hard, and here's a primer to help you understand how to create the necessary Azure Automation environment to develop and execute runbooks. Once modules and permissions are\u2026","rel":"","context":"In "Graph API"","block_context":{"text":"Graph API","link":"https:\/\/office365itpros.com\/category\/graph-api\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Azure-Automation-runbooks.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Azure-Automation-runbooks.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Azure-Automation-runbooks.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Azure-Automation-runbooks.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/office365itpros.com\/wp-content\/uploads\/2025\/01\/Azure-Automation-runbooks.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/posts\/71132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/comments?post=71132"}],"version-history":[{"count":13,"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/posts\/71132\/revisions"}],"predecessor-version":[{"id":71193,"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/posts\/71132\/revisions\/71193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/media\/71142"}],"wp:attachment":[{"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/media?parent=71132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/categories?post=71132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/office365itpros.com\/wp-json\/wp\/v2\/tags?post=71132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}