internal/functions/invoke-enqueueintegration.ps1
function Invoke-EnqueueIntegration($Config, $Job, $StorageContext, $Container) { $d365FO = $Config.D365FO $authority = $Config.Authority $clientId = $Config.ClientId $clientSecret = $Config.ClientSecret $action = $Config.Action $jobId = $job.Job_Id $file = $job.FilePath $requestUrl = "$d365FO/api/connector/enqueue/$jobId" $authorizationHeader = New-AuthorizationHeader $authority $clientId $clientSecret $D365FO $webRequest = New-WebRequest $requestUrl $authorizationHeader $action $file "File" "application/zip" $response = Get-IntegrationResponse $webRequest Write-Verbose $reponse } |