Run Azure Unified Labelling Client in Azure Automation Services
I have installed Azure Unified Labelling Client PowerShell modules in Azure Automation Account and trying to use the Set-AIPAuthentication and Set-AIPFileLabel cmdlets to non interactively apply a label to a file but it does not seem to be working in Azure Automation Runbook.
I have tried to run in a standalone server by installing the Azure Unified lableling client and it works fine with the below commands
Set-AIPAuthentication -AppId <Appid> -AppSecret <AppSecret> -TenantId "<TenantID>" -DelegatedUser <UserEmail> -OnBehalfOf <LocalWindowsCredential>
Set-AIPFileLabel -Path C:\Welcomeword.docx -LabelId <LabelID>
In Azure automation, I have used the below
Set-AIPAuthentication -AppId <Appid> -AppSecret <AppSecret> -TenantId "<TenantID>" -DelegatedUser <UserEmail>
Set-AIPFileLabel -Path C:\Welcomeword.docx -LabelId <LabelID>
I have packaged the Modules in a zip file from the C:\Program Files(x86)\Azure Information Protection folder and Added the modules to Azure Automation account.
I dont get any error information while executing the Set-AIPFileLabel cmdlet.