functions/Deploy-App-SaaS.psm1
function RIT-Deploy-App-SaaS { Param( [string] $tenantId = '', [string] $environment = '', [string] $clientId = 'dc257c22-50f5-4e27-bbd8-964d906e01cc', [string] $aadSecret = '', [Parameter(Mandatory=$false)][switch] $ForceSync = $false ) $appPath = Get-ChildItem -Path "$env:AGENT_RELEASEDIRECTORY\*.app" -Recurse $secret = ConvertTo-SecureString $aadSecret -AsPlainText -Force $authContext = New-BcAuthContext -clientID $clientId -clientSecret $secret -tenantID $tenantId if ($ForceSync) { Publish-PerTenantExtensionApps -bcAuthContext $authContext -environment $environment -appFiles $appPath -schemaSyncMode Force } else { Publish-PerTenantExtensionApps -bcAuthContext $authContext -environment $environment -appFiles $appPath } } Export-ModuleMember -Function RIT-Deploy-App-SaaS |