Created
June 9, 2018 15:06
-
-
Save arjancornelissen/aa2b4aced1d55aecc7dd19981606afa0 to your computer and use it in GitHub Desktop.
Connect to SharePoint Online in Azure Automation with Run As account
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$servicePrincipalConnection=Get-AutomationConnection -Name "AzureRunAsConnection" | |
$appsecret = Get-AutomationVariable -Name "SPAppSecret" | |
Connect-PnPOnline -AppId $servicePrincipalConnection.ApplicationId -AppSecret $appsecret -Url "https://<tenant>-admin.sharepoint.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment