diff --git a/.DS_Store b/.DS_Store index d193e2e23923..cd4d9bb74372 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.github/workflows/upload_dev.yml b/.github/workflows/upload_dev.yml index 37ceb8fcd3fb..f01108f3c68b 100644 --- a/.github/workflows/upload_dev.yml +++ b/.github/workflows/upload_dev.yml @@ -18,6 +18,13 @@ jobs: with: persist-credentials: false + # Create version.json with version and commit hash + - name: Create version.json + run: | + VERSION=$(cat version_latest.txt | tr -d '[:space:]') + SHORT_SHA="${GITHUB_SHA::7}" + echo "{\"version\": \"${VERSION}\", \"commit\": \"${SHORT_SHA}\"}" > version.json + # Create ZIP File in a New Source Directory - name: Prepare and Zip Release Files run: | diff --git a/CIPPActivityFunction/function.json b/CIPPActivityFunction/function.json index 5b4af75973bd..cc2fabca773b 100644 --- a/CIPPActivityFunction/function.json +++ b/CIPPActivityFunction/function.json @@ -11,6 +11,12 @@ "name": "starter", "type": "durableClient", "direction": "in" + }, + { + "type": "queue", + "direction": "out", + "name": "QueueItem", + "queueName": "cippqueue" } ] } diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.dll deleted file mode 100644 index 130416a22070..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.pdb b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.pdb deleted file mode 100644 index c1ee74cc90c1..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.pdb and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Castle.Core.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Castle.Core.dll deleted file mode 100644 index 96e43f2136f9..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Castle.Core.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableEngine.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableEngine.dll deleted file mode 100644 index 72b49dd0d584..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableEngine.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableEngine.pdb b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableEngine.pdb deleted file mode 100644 index ff5ff77c1e52..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableEngine.pdb and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableTask.Core.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableTask.Core.dll deleted file mode 100644 index 3382c7d6ddfb..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/DurableTask.Core.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Bcl.AsyncInterfaces.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Bcl.AsyncInterfaces.dll deleted file mode 100644 index fe6ba4c549bc..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Bcl.AsyncInterfaces.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Abstractions.dll deleted file mode 100644 index 0dc818acefc3..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Abstractions.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Client.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Client.dll deleted file mode 100644 index 8bd64329e66c..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Client.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Worker.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Worker.dll deleted file mode 100644 index ea826b4fdf8b..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.DurableTask.Worker.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Configuration.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Configuration.Abstractions.dll deleted file mode 100644 index 9a24516f399b..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Configuration.Abstractions.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.DependencyInjection.Abstractions.dll deleted file mode 100644 index b4ee93da0299..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.DependencyInjection.Abstractions.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.FileProviders.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.FileProviders.Abstractions.dll deleted file mode 100644 index d1045b65ad92..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.FileProviders.Abstractions.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Hosting.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Hosting.Abstractions.dll deleted file mode 100644 index 4d33a647fda8..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Hosting.Abstractions.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Logging.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Logging.Abstractions.dll deleted file mode 100644 index bb27a2fcaa36..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Logging.Abstractions.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Options.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Options.dll deleted file mode 100644 index 604b60275e68..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Options.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Primitives.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Primitives.dll deleted file mode 100644 index 1b2c43afc495..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Microsoft.Extensions.Primitives.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Newtonsoft.Json.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Newtonsoft.Json.dll deleted file mode 100644 index 1ffeabe658ac..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/Newtonsoft.Json.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Diagnostics.EventLog.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Diagnostics.EventLog.dll deleted file mode 100644 index 8a65e715b96e..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Diagnostics.EventLog.dll and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/manifest.json b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/manifest.json deleted file mode 100644 index 518614cdecd8..000000000000 --- a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/manifest.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "Outputs": [ - { - "Source": "/AzureFunctions.PowerShell.Durable.SDK.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "3F64733E95FA5EAAD067DDB374C685CA986498C76A61D7CCC0E54990F8777598" - }, - { - "Source": "/Dependencies/Microsoft.Bcl.AsyncInterfaces.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "5705D245072D3EB78400547B32147DBB6E2C8B02BA8BDA76729798F5EFDEAECB" - }, - { - "Source": "/Dependencies/Microsoft.Extensions.Logging.Abstractions.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "D575C9D1543CA726CE14DBDFFD103E93EA527CD46BB28316DA1F4122DBC55D56" - }, - { - "Source": "/Dependencies/System.Reactive.Linq.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "33EB42B7065A01963DBCD762CDC81A4135B6E0E927DDF4C88EAE121AD5F69F92" - }, - { - "Source": "/AzureFunctions.PowerShell.Durable.SDK.pdb", - "AzureArtifactsHash": "0442534A4201000100000000000C0000005044422076312E3000000000000006007C", - "Sha256Hash": "D0FAA169052E0509893EFAB5C413C5184571A71824C7EF23486D235DCCFBE808" - }, - { - "Source": "/Dependencies/Microsoft.DurableTask.Abstractions.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "CC13EF28BE5C94860CCADF1B9D9E8E505484B1AB40D2D3F60827E14E109FEB0C" - }, - { - "Source": "/Dependencies/Microsoft.Extensions.Options.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "786112CB2F6646EF1170219A8C0BB813C9F14A6781E67C6266414F55A679565D" - }, - { - "Source": "/Dependencies/System.Reactive.PlatformServices.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "2D864B716FBAE8C1880143574332A10FBC6D98613AA09F6DD98D9D08B82B65AD" - }, - { - "Source": "/AzureFunctions.PowerShell.Durable.SDK.psd1", - "AzureArtifactsHash": "04407B202020200D0A20202020232056657273696F6E206E756D626572206F662074", - "Sha256Hash": "B8A8129C8C7128112721040E2F0611F05DAA5EA89586CC0DFFE371BC3949D327" - }, - { - "Source": "/Dependencies/Microsoft.DurableTask.Client.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "AE75348D5D809C89D700B34E9DD3826E218DBB7E9749372ABEE72939FE29C426" - }, - { - "Source": "/Dependencies/Microsoft.Extensions.Primitives.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "8CE9A85927EC7507B11FFE90080E7A811D51304A9E8B1DA20C350159BA403902" - }, - { - "Source": "/Dependencies/System.Reactive.Providers.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "79A12C5227A000F8608520F2CAB63BECC4412415A1DBEFF29179DFCAA13B6A3A" - }, - { - "Source": "/AzureFunctions.PowerShell.Durable.SDK.psm1", - "AzureArtifactsHash": "04230D0A2320436F7079726967687420286329204D6963726F736F66742E20416C6C", - "Sha256Hash": "EC87A8BA539AAB3498FC24227C2DA03A5666C5274C23A8D79E4513988D896149" - }, - { - "Source": "/Dependencies/Microsoft.DurableTask.Worker.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "D8D460A09A7E51C1A365883F3296394C1B86257A5235EC30DEDD597BA5F0FC49" - }, - { - "Source": "/Dependencies/Newtonsoft.Json.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "72CF291D4BAB0EDD08A9B07C6173E1E7AD1ABB7AB727FD7044BF6305D7515661" - }, - { - "Source": "/Dependencies/Castle.Core.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "ACA835865E0F0E19E5E69031D1C4C1288961CF4972C5918868ACA513CA6BCE51" - }, - { - "Source": "/Dependencies/Microsoft.Extensions.Configuration.Abstractions.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "E4EB5EB7E28A5548CD904FE1A9C3569ADEF91F52B654DB8A3C56A0A5177A09EB" - }, - { - "Source": "/Dependencies/System.Diagnostics.EventLog.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "24A02D97C2FC6D56735E196BB7FAAAE8FAF0068C486D0C3C7FA3E3B73B4F12A4" - }, - { - "Source": "/Dependencies/DurableEngine.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "BA0249BE14025D6ECA437244B6F9748EEAA99A15A1DE1D8AB288987FECB7FE81" - }, - { - "Source": "/Dependencies/Microsoft.Extensions.DependencyInjection.Abstractions.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "9CCD830351AA28BC683D4F8D1CEFD9E724161F972D25BFB64EEE5BF55C48C5E3" - }, - { - "Source": "/Dependencies/System.Reactive.Core.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "47411515E22254958AB719D8C312E6BF7904E32DD1869EB27BF2DDC4E590CAB4" - }, - { - "Source": "/Dependencies/DurableEngine.pdb", - "AzureArtifactsHash": "0442534A4201000100000000000C0000005044422076312E3000000000000006007C", - "Sha256Hash": "340528248A6410D58F860D03557310454EF3285B642C21343DDD083D2E320218" - }, - { - "Source": "/Dependencies/Microsoft.Extensions.FileProviders.Abstractions.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "ECFCEF11C42FA4AD5CF2D4D7F553C8F0017E5EB7A4A9B032B4D0505C98EF4EF4" - }, - { - "Source": "/Dependencies/System.Reactive.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "19F0112CD1F5172EE2688E96DDD44ADA39A4BB1CB2315A154B63E9064F6E3DC0" - }, - { - "Source": "/Dependencies/DurableTask.Core.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "7AA8BB6481F2C61D220A73CD2DA77ADB2D2D28DF1FA02E093DDA3A29A55DC514" - }, - { - "Source": "/Dependencies/Microsoft.Extensions.Hosting.Abstractions.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "DF9EB42421A85F84FF2FC98EA25C23FD7D8813DF23F3AFE28E96B83CC302C8A6" - }, - { - "Source": "/Dependencies/System.Reactive.Interfaces.dll", - "AzureArtifactsHash": "044D5A90000300000004000000FFFF0000B800000000000000400000000000000000", - "Sha256Hash": "EDEE1397E02DF23F85D0B242BB098C850D64CD6CA860AABB34426253A6E3ADAB" - } - ], - "CloudBuildId": "161406", - "Repo": "https://github.com/Azure/azure-functions-durable-powershell", - "Branch": "main", - "CommitId": "936fcb2e1de189e397c154eff6ffe889e9ea2c9d", - "Version": "0.0.1", - "Timestamp": 1707882977 -} \ No newline at end of file diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/manifest.json.sha256 b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/manifest.json.sha256 deleted file mode 100644 index 676d4e7c1744..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/manifest.json.sha256 and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/spdx_2.2/manifest.spdx.json b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/spdx_2.2/manifest.spdx.json deleted file mode 100644 index 0929551b8a2c..000000000000 --- a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/spdx_2.2/manifest.spdx.json +++ /dev/null @@ -1,614 +0,0 @@ -{ - "files": [ - { - "fileName": "./AzureFunctions.PowerShell.Durable.SDK.dll", - "SPDXID": "SPDXRef-File--AzureFunctions.PowerShell.Durable.SDK.dll-6F9536B4793B4E4A898D19796D658F79421C54A6", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "3f64733e95fa5eaad067ddb374c685ca986498c76a61d7ccc0e54990f8777598" - }, - { - "algorithm": "SHA1", - "checksumValue": "6f9536b4793b4e4a898d19796d658f79421c54a6" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.Bcl.AsyncInterfaces.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.Bcl.AsyncInterfaces.dll-2E438AEF830795B2D240CF3160A3353BC6CB0232", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "5705d245072d3eb78400547b32147dbb6e2c8b02ba8bda76729798f5efdeaecb" - }, - { - "algorithm": "SHA1", - "checksumValue": "2e438aef830795b2d240cf3160a3353bc6cb0232" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.Extensions.Logging.Abstractions.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.Extensions.Logging.Abstractions.dll-02EC010722BBD1740782B502DF30D4475AEBE5F2", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "d575c9d1543ca726ce14dbdffd103e93ea527cd46bb28316da1f4122dbc55d56" - }, - { - "algorithm": "SHA1", - "checksumValue": "02ec010722bbd1740782b502df30d4475aebe5f2" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/System.Reactive.Linq.dll", - "SPDXID": "SPDXRef-File--Dependencies-System.Reactive.Linq.dll-21B3C0F5AE5F6C6A436ECC37E747BF931C141D14", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "33eb42b7065a01963dbcd762cdc81a4135b6e0e927ddf4c88eae121ad5f69f92" - }, - { - "algorithm": "SHA1", - "checksumValue": "21b3c0f5ae5f6c6a436ecc37e747bf931c141d14" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./AzureFunctions.PowerShell.Durable.SDK.pdb", - "SPDXID": "SPDXRef-File--AzureFunctions.PowerShell.Durable.SDK.pdb-0910275DA2D13FAEDDEC83044EFFB5ABDE669BF8", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "d0faa169052e0509893efab5c413c5184571a71824c7ef23486d235dccfbe808" - }, - { - "algorithm": "SHA1", - "checksumValue": "0910275da2d13faeddec83044effb5abde669bf8" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.DurableTask.Abstractions.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.DurableTask.Abstractions.dll-D1D43D1F5B80C63EF1E52985922BB90ADEA5DEEC", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "cc13ef28be5c94860ccadf1b9d9e8e505484b1ab40d2d3f60827e14e109feb0c" - }, - { - "algorithm": "SHA1", - "checksumValue": "d1d43d1f5b80c63ef1e52985922bb90adea5deec" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.Extensions.Options.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.Extensions.Options.dll-6EC0C1FE1332912086247080B55B06623C78326E", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "786112cb2f6646ef1170219a8c0bb813c9f14a6781e67c6266414f55a679565d" - }, - { - "algorithm": "SHA1", - "checksumValue": "6ec0c1fe1332912086247080b55b06623c78326e" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/System.Reactive.PlatformServices.dll", - "SPDXID": "SPDXRef-File--Dependencies-System.Reactive.PlatformServices.dll-8A33FDD641185C66DD4FD3DB88DF5504621D3BF4", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "2d864b716fbae8c1880143574332a10fbc6d98613aa09f6dd98d9d08b82b65ad" - }, - { - "algorithm": "SHA1", - "checksumValue": "8a33fdd641185c66dd4fd3db88df5504621d3bf4" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./AzureFunctions.PowerShell.Durable.SDK.psd1", - "SPDXID": "SPDXRef-File--AzureFunctions.PowerShell.Durable.SDK.psd1-B73743D787C4BFC0ECA8585F5E1C37B28DE70DAC", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "b8a8129c8c7128112721040e2f0611f05daa5ea89586cc0dffe371bc3949d327" - }, - { - "algorithm": "SHA1", - "checksumValue": "b73743d787c4bfc0eca8585f5e1c37b28de70dac" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.DurableTask.Client.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.DurableTask.Client.dll-0DE9E1C4F3587BC9C002F935BA5023890ED18B8F", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "ae75348d5d809c89d700b34e9dd3826e218dbb7e9749372abee72939fe29c426" - }, - { - "algorithm": "SHA1", - "checksumValue": "0de9e1c4f3587bc9c002f935ba5023890ed18b8f" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.Extensions.Primitives.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.Extensions.Primitives.dll-376636C20CEE083DA54D4146479032170EC7231B", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "8ce9a85927ec7507b11ffe90080e7a811d51304a9e8b1da20c350159ba403902" - }, - { - "algorithm": "SHA1", - "checksumValue": "376636c20cee083da54d4146479032170ec7231b" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/System.Reactive.Providers.dll", - "SPDXID": "SPDXRef-File--Dependencies-System.Reactive.Providers.dll-74AA6DBBCB5397BB09D1E69FFCFE9526CBFCEB44", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "79a12c5227a000f8608520f2cab63becc4412415a1dbeff29179dfcaa13b6a3a" - }, - { - "algorithm": "SHA1", - "checksumValue": "74aa6dbbcb5397bb09d1e69ffcfe9526cbfceb44" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./AzureFunctions.PowerShell.Durable.SDK.psm1", - "SPDXID": "SPDXRef-File--AzureFunctions.PowerShell.Durable.SDK.psm1-F3BBC7A52B2C2661C7D2806D1787FBD1FB1473B3", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "ec87a8ba539aab3498fc24227c2da03a5666c5274c23a8d79e4513988d896149" - }, - { - "algorithm": "SHA1", - "checksumValue": "f3bbc7a52b2c2661c7d2806d1787fbd1fb1473b3" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.DurableTask.Worker.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.DurableTask.Worker.dll-D3C716C746EB41567EB15E92313871FF5DF6FE1E", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "d8d460a09a7e51c1a365883f3296394c1b86257a5235ec30dedd597ba5f0fc49" - }, - { - "algorithm": "SHA1", - "checksumValue": "d3c716c746eb41567eb15e92313871ff5df6fe1e" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Newtonsoft.Json.dll", - "SPDXID": "SPDXRef-File--Dependencies-Newtonsoft.Json.dll-E3673D05D46F29E68241D4536BDDF18CDD0A913D", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "72cf291d4bab0edd08a9b07c6173e1e7ad1abb7ab727fd7044bf6305d7515661" - }, - { - "algorithm": "SHA1", - "checksumValue": "e3673d05d46f29e68241d4536bddf18cdd0a913d" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Castle.Core.dll", - "SPDXID": "SPDXRef-File--Dependencies-Castle.Core.dll-EFB41379A448DA4C368F5694D0675F99662D27C6", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "aca835865e0f0e19e5e69031d1c4c1288961cf4972c5918868aca513ca6bce51" - }, - { - "algorithm": "SHA1", - "checksumValue": "efb41379a448da4c368f5694d0675f99662d27c6" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.Extensions.Configuration.Abstractions.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.Extensions.Configuration.Abstractions.dll-C524C7D46A343B75A64BF52B19E3C70C453F9061", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "e4eb5eb7e28a5548cd904fe1a9c3569adef91f52b654db8a3c56a0a5177a09eb" - }, - { - "algorithm": "SHA1", - "checksumValue": "c524c7d46a343b75a64bf52b19e3c70c453f9061" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/System.Diagnostics.EventLog.dll", - "SPDXID": "SPDXRef-File--Dependencies-System.Diagnostics.EventLog.dll-96A914148520A9F0AB3733410129FFB7BA2992CC", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "24a02d97c2fc6d56735e196bb7faaae8faf0068c486d0c3c7fa3e3b73b4f12a4" - }, - { - "algorithm": "SHA1", - "checksumValue": "96a914148520a9f0ab3733410129ffb7ba2992cc" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/DurableEngine.dll", - "SPDXID": "SPDXRef-File--Dependencies-DurableEngine.dll-3E456B859993DC8BB19A9793877FA6F1545870CF", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "ba0249be14025d6eca437244b6f9748eeaa99a15a1de1d8ab288987fecb7fe81" - }, - { - "algorithm": "SHA1", - "checksumValue": "3e456b859993dc8bb19a9793877fa6f1545870cf" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.Extensions.DependencyInjection.Abstractions.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.Extensions.DependencyInjection.Abstractions.dll-CB8C35306AFD15358104ECFE70E724AD9C753E6F", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "9ccd830351aa28bc683d4f8d1cefd9e724161f972d25bfb64eee5bf55c48c5e3" - }, - { - "algorithm": "SHA1", - "checksumValue": "cb8c35306afd15358104ecfe70e724ad9c753e6f" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/System.Reactive.Core.dll", - "SPDXID": "SPDXRef-File--Dependencies-System.Reactive.Core.dll-A91898005B1CC48E3F6A4CBB835CAFFC8C6A85CB", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "47411515e22254958ab719d8c312e6bf7904e32dd1869eb27bf2ddc4e590cab4" - }, - { - "algorithm": "SHA1", - "checksumValue": "a91898005b1cc48e3f6a4cbb835caffc8c6a85cb" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/DurableEngine.pdb", - "SPDXID": "SPDXRef-File--Dependencies-DurableEngine.pdb-64EF52D4B87DBCDDBB6055D321277C5C18C6DCC3", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "340528248a6410d58f860d03557310454ef3285b642c21343ddd083d2e320218" - }, - { - "algorithm": "SHA1", - "checksumValue": "64ef52d4b87dbcddbb6055d321277c5c18c6dcc3" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.Extensions.FileProviders.Abstractions.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.Extensions.FileProviders.Abstractions.dll-3029F45A1397291B4E7EEE9DB9B5DCDE5A47AB7D", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "ecfcef11c42fa4ad5cf2d4d7f553c8f0017e5eb7a4a9b032b4d0505c98ef4ef4" - }, - { - "algorithm": "SHA1", - "checksumValue": "3029f45a1397291b4e7eee9db9b5dcde5a47ab7d" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/System.Reactive.dll", - "SPDXID": "SPDXRef-File--Dependencies-System.Reactive.dll-9CBCA70CC79F7476D92B481C6BEC46CE85433328", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "19f0112cd1f5172ee2688e96ddd44ada39a4bb1cb2315a154b63e9064f6e3dc0" - }, - { - "algorithm": "SHA1", - "checksumValue": "9cbca70cc79f7476d92b481c6bec46ce85433328" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/DurableTask.Core.dll", - "SPDXID": "SPDXRef-File--Dependencies-DurableTask.Core.dll-0064DA99C6E1C6FED54FAB9396878975A1D28EAF", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "7aa8bb6481f2c61d220a73cd2da77adb2d2d28df1fa02e093dda3a29a55dc514" - }, - { - "algorithm": "SHA1", - "checksumValue": "0064da99c6e1c6fed54fab9396878975a1d28eaf" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/Microsoft.Extensions.Hosting.Abstractions.dll", - "SPDXID": "SPDXRef-File--Dependencies-Microsoft.Extensions.Hosting.Abstractions.dll-BBA99CBFE0EFD265CA5A2563624884D4F88BA0C3", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "df9eb42421a85f84ff2fc98ea25c23fd7d8813df23f3afe28e96b83cc302c8a6" - }, - { - "algorithm": "SHA1", - "checksumValue": "bba99cbfe0efd265ca5a2563624884d4f88ba0c3" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - }, - { - "fileName": "./Dependencies/System.Reactive.Interfaces.dll", - "SPDXID": "SPDXRef-File--Dependencies-System.Reactive.Interfaces.dll-74F54702F12252A2DAC2D87D89809C7A1A475F81", - "checksums": [ - { - "algorithm": "SHA256", - "checksumValue": "edee1397e02df23f85d0b242bb098c850d64cd6ca860aabb34426253a6e3adab" - }, - { - "algorithm": "SHA1", - "checksumValue": "74f54702f12252a2dac2d87d89809c7a1a475f81" - } - ], - "licenseConcluded": "NOASSERTION", - "licenseInfoInFiles": [ - "NOASSERTION" - ], - "copyrightText": "NOASSERTION" - } - ], - "packages": [ - { - "name": "Azure Pipelines Hosted Image win19", - "SPDXID": "SPDXRef-Package-CF52430A379AE1274A6751A714171963CB52B825609E0388B1BFD37D3EB601BA", - "downloadLocation": "NOASSERTION", - "filesAnalyzed": false, - "licenseConcluded": "NOASSERTION", - "licenseInfoFromFiles": [ - "NOASSERTION" - ], - "licenseDeclared": "NOASSERTION", - "copyrightText": "NOASSERTION", - "versionInfo": "20240204.1.0", - "externalRefs": [ - { - "referenceCategory": "PACKAGE_MANAGER", - "referenceType": "purl", - "referenceLocator": "https://github.com/actions/virtual-environments" - } - ], - "supplier": "Microsoft/GitHub" - }, - { - "name": "AzureFunctions.PowerShell.Durable.SDK", - "SPDXID": "SPDXRef-RootPackage", - "downloadLocation": "NOASSERTION", - "packageVerificationCode": { - "packageVerificationCodeValue": "d00047eebac7ad954598fd8b41bf2c6e643db5a5" - }, - "filesAnalyzed": true, - "licenseConcluded": "NOASSERTION", - "licenseInfoFromFiles": [ - "NOASSERTION" - ], - "licenseDeclared": "NOASSERTION", - "copyrightText": "NOASSERTION", - "versionInfo": "161406", - "supplier": "Organization: Microsoft", - "hasFiles": [ - "SPDXRef-File--Dependencies-System.Reactive.Interfaces.dll-74F54702F12252A2DAC2D87D89809C7A1A475F81", - "SPDXRef-File--Dependencies-Microsoft.Extensions.Hosting.Abstractions.dll-BBA99CBFE0EFD265CA5A2563624884D4F88BA0C3", - "SPDXRef-File--Dependencies-DurableTask.Core.dll-0064DA99C6E1C6FED54FAB9396878975A1D28EAF", - "SPDXRef-File--Dependencies-System.Reactive.Providers.dll-74AA6DBBCB5397BB09D1E69FFCFE9526CBFCEB44", - "SPDXRef-File--Dependencies-Microsoft.Extensions.Primitives.dll-376636C20CEE083DA54D4146479032170EC7231B", - "SPDXRef-File--Dependencies-Microsoft.DurableTask.Client.dll-0DE9E1C4F3587BC9C002F935BA5023890ED18B8F", - "SPDXRef-File--AzureFunctions.PowerShell.Durable.SDK.psd1-B73743D787C4BFC0ECA8585F5E1C37B28DE70DAC", - "SPDXRef-File--Dependencies-System.Reactive.PlatformServices.dll-8A33FDD641185C66DD4FD3DB88DF5504621D3BF4", - "SPDXRef-File--Dependencies-Microsoft.Extensions.Options.dll-6EC0C1FE1332912086247080B55B06623C78326E", - "SPDXRef-File--Dependencies-Microsoft.DurableTask.Abstractions.dll-D1D43D1F5B80C63EF1E52985922BB90ADEA5DEEC", - "SPDXRef-File--AzureFunctions.PowerShell.Durable.SDK.pdb-0910275DA2D13FAEDDEC83044EFFB5ABDE669BF8", - "SPDXRef-File--Dependencies-Newtonsoft.Json.dll-E3673D05D46F29E68241D4536BDDF18CDD0A913D", - "SPDXRef-File--Dependencies-Microsoft.DurableTask.Worker.dll-D3C716C746EB41567EB15E92313871FF5DF6FE1E", - "SPDXRef-File--AzureFunctions.PowerShell.Durable.SDK.psm1-F3BBC7A52B2C2661C7D2806D1787FBD1FB1473B3", - "SPDXRef-File--Dependencies-System.Reactive.dll-9CBCA70CC79F7476D92B481C6BEC46CE85433328", - "SPDXRef-File--Dependencies-Microsoft.Extensions.FileProviders.Abstractions.dll-3029F45A1397291B4E7EEE9DB9B5DCDE5A47AB7D", - "SPDXRef-File--Dependencies-DurableEngine.pdb-64EF52D4B87DBCDDBB6055D321277C5C18C6DCC3", - "SPDXRef-File--Dependencies-System.Diagnostics.EventLog.dll-96A914148520A9F0AB3733410129FFB7BA2992CC", - "SPDXRef-File--Dependencies-Microsoft.Extensions.Configuration.Abstractions.dll-C524C7D46A343B75A64BF52B19E3C70C453F9061", - "SPDXRef-File--Dependencies-Castle.Core.dll-EFB41379A448DA4C368F5694D0675F99662D27C6", - "SPDXRef-File--Dependencies-System.Reactive.Core.dll-A91898005B1CC48E3F6A4CBB835CAFFC8C6A85CB", - "SPDXRef-File--Dependencies-Microsoft.Extensions.DependencyInjection.Abstractions.dll-CB8C35306AFD15358104ECFE70E724AD9C753E6F", - "SPDXRef-File--Dependencies-DurableEngine.dll-3E456B859993DC8BB19A9793877FA6F1545870CF", - "SPDXRef-File--Dependencies-System.Reactive.Linq.dll-21B3C0F5AE5F6C6A436ECC37E747BF931C141D14", - "SPDXRef-File--Dependencies-Microsoft.Extensions.Logging.Abstractions.dll-02EC010722BBD1740782B502DF30D4475AEBE5F2", - "SPDXRef-File--Dependencies-Microsoft.Bcl.AsyncInterfaces.dll-2E438AEF830795B2D240CF3160A3353BC6CB0232", - "SPDXRef-File--AzureFunctions.PowerShell.Durable.SDK.dll-6F9536B4793B4E4A898D19796D658F79421C54A6" - ] - } - ], - "externalDocumentRefs": [], - "relationships": [ - { - "relationshipType": "DEPENDS_ON", - "relatedSpdxElement": "SPDXRef-Package-CF52430A379AE1274A6751A714171963CB52B825609E0388B1BFD37D3EB601BA", - "spdxElementId": "SPDXRef-RootPackage" - }, - { - "relationshipType": "DESCRIBES", - "relatedSpdxElement": "SPDXRef-RootPackage", - "spdxElementId": "SPDXRef-DOCUMENT" - } - ], - "spdxVersion": "SPDX-2.2", - "dataLicense": "CC0-1.0", - "SPDXID": "SPDXRef-DOCUMENT", - "name": "AzureFunctions.PowerShell.Durable.SDK 161406", - "documentNamespace": "https://sbom.microsoft/1:vB_F0XdED0q5n_yQEwCaWA:kgyn5ihBn0OAEjgv541jlg/110:161406/ydvUjPTB7UO2kZ1ZV8NHQQ", - "creationInfo": { - "created": "2024-02-14T03:56:17Z", - "creators": [ - "Organization: Microsoft", - "Tool: Microsoft.SBOMTool-2.1.31" - ] - }, - "documentDescribes": [ - "SPDXRef-RootPackage" - ] -} \ No newline at end of file diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/spdx_2.2/manifest.spdx.json.sha256 b/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/spdx_2.2/manifest.spdx.json.sha256 deleted file mode 100644 index 8d2e41ac14f7..000000000000 Binary files a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/_manifest/spdx_2.2/manifest.spdx.json.sha256 and /dev/null differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.dll new file mode 100644 index 000000000000..0fd831215c97 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.pdb b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.pdb new file mode 100644 index 000000000000..d2e44cf7c4cf Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.pdb differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.psd1 b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.psd1 similarity index 94% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.psd1 rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.psd1 index db2db4336280..104bad8c8079 100644 --- a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.psd1 +++ b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.psd1 @@ -1,6 +1,6 @@ @{ # Version number of this module. - ModuleVersion = '1.1.0' + ModuleVersion = '2.2.0' # Supported PSEditions CompatiblePSEditions = @('Core') @@ -18,10 +18,10 @@ Copyright = '(c) Microsoft Corporation. All rights reserved.' # Description of the functionality provided by this module - Description = 'Initial release of the Durable Functions SDK for PowerShell. This package is to be used exclusively with the Azure Functions PowerShell worker.' + Description = 'Durable Functions SDK for PowerShell. This package is to be used exclusively with the Azure Functions PowerShell worker.' # Minimum version of the PowerShell engine required by this module - PowerShellVersion = '7.2' + PowerShellVersion = '7.4' # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # TODO: use this for pretty-printing DF tasks diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.psm1 b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.psm1 similarity index 83% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.psm1 rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.psm1 index 1cffa0cbb1e4..5a6998a425b0 100644 --- a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/AzureFunctions.PowerShell.Durable.SDK.psm1 +++ b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/AzureFunctions.PowerShell.Durable.SDK.psm1 @@ -22,6 +22,16 @@ function GetDurableClientFromModulePrivateData { } } +function GetInvocationIdFromModulePrivateData { + $PrivateData = $PSCmdlet.MyInvocation.MyCommand.Module.PrivateData + if ($null -eq $PrivateData -or $null -eq $PrivateData['InvocationId']) { + return $null + } + else { + return $PrivateData['InvocationId'] + } +} + function Get-DurableStatus { [CmdletBinding()] param( @@ -69,21 +79,6 @@ function Get-DurableStatus { Invoke-RestMethod -Uri $requestUrl } -<# -.SYNOPSIS - Start an orchestration Azure Function. -.DESCRIPTION - Start an orchestration Azure Function with the given function name and input value. -.EXAMPLE - PS > Start-DurableOrchestration -DurableClient Starter -FunctionName OrchestratorFunction -InputObject "input value for the orchestration function" - Return the instance id of the new orchestration. -.PARAMETER FunctionName - The name of the orchestration Azure Function you want to start. -.PARAMETER InputObject - The input value that will be passed to the orchestration Azure Function. -.PARAMETER DurableClient - The orchestration client object. -#> function Start-DurableOrchestration { [CmdletBinding()] param( @@ -105,7 +100,11 @@ function Start-DurableOrchestration { [Parameter( ValueFromPipelineByPropertyName=$true)] - [string] $InstanceId + [string] $InstanceId, + + [Parameter( + ValueFromPipelineByPropertyName=$true)] + [string] $Version ) $ErrorActionPreference = 'Stop' @@ -118,6 +117,9 @@ function Start-DurableOrchestration { $InstanceId = (New-Guid).Guid } + $invocationId = GetInvocationIdFromModulePrivateData + $headers = Get-TraceHeaders -InvocationId $invocationId + $Uri = if ($DurableClient.rpcBaseUrl) { # Fast local RPC path @@ -128,13 +130,57 @@ function Start-DurableOrchestration { $UriTemplate.Replace('{functionName}', $FunctionName).Replace('[/{instanceId}]', "/$InstanceId") } + # Add version parameter to query string if provided + if ($Version) { + $separator = if ($Uri.Contains('?')) { '&' } else { '?' } + $Uri += "$separator" + "version=$([System.Web.HttpUtility]::UrlEncode($Version))" + } + $Body = $InputObject | ConvertTo-Json -Compress -Depth 100 - $null = Invoke-RestMethod -Uri $Uri -Method 'POST' -ContentType 'application/json' -Body $Body + $null = Invoke-RestMethod -Uri $Uri -Method 'POST' -ContentType 'application/json' -Body $Body -Headers $headers return $instanceId } +function Get-TraceHeaders { + param( + [string] $InvocationId + ) + + if ($null -eq $InvocationId -or $InvocationId -eq "") { + return @{} # Return an empty headers object + } + + # Check if Get-CurrentActivityForInvocation is available + if (-not (Get-Command -Name Get-CurrentActivityForInvocation -ErrorAction SilentlyContinue)) { + Write-Warning "Get-CurrentActivityForInvocation is not available. Skipping call." + return @{} # Return an empty headers object + } + + $activityResponse = Get-CurrentActivityForInvocation -InvocationId $invocationId + $activity = $activityResponse.activity + + $traceId = $activity.TraceId + $spanId = $activity.SpanId + $traceFlags = $activity.TraceFlags + $traceState = $activity.TraceStateString + + $flag = "00" + if ($null -ne $traceFlags -and $traceFlags -eq "Recorded") { + $flag = "01" + } + + $traceparent = "00-$traceId-$spanId-$flag" + + $headers = @{ + "traceparent" = $traceparent + "tracestate" = $traceState + } + + return $headers +} + function Stop-DurableOrchestration { [CmdletBinding()] param( @@ -284,25 +330,6 @@ function New-DurableOrchestrationCheckStatusResponse { } } -<# -.SYNOPSIS - Send an external event to an orchestration instance. -.DESCRIPTION - Send an external event with the given event name, and event data to an orchestration instance with the given instance ID. -.EXAMPLE - PS > Send-DurableExternalEvent -InstanceId "example-instance-id" -EventName "ExampleExternalEvent" -EventData "data for the external event" - Return the instance id of the new orchestration. -.PARAMETER InstanceId - The ID of the orchestration instance that will handle the external event. -.PARAMETER EventName - The name of the external event. -.PARAMETER EventData - The JSON-serializable data associated with the external event. -.PARAMETER TaskHubName - The TaskHubName of the orchestration instance that will handle the external event. -.PARAMETER ConnectionName - The name of the connection string associated with TaskHubName -#> function Send-DurableExternalEvent { [CmdletBinding()] param( diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Castle.Core.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Castle.Core.dll new file mode 100644 index 000000000000..7097894bf456 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Castle.Core.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableEngine.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableEngine.dll new file mode 100644 index 000000000000..1d5da711879d Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableEngine.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableEngine.pdb b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableEngine.pdb new file mode 100644 index 000000000000..f9b24fdfeebb Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableEngine.pdb differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableTask.Core.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableTask.Core.dll new file mode 100644 index 000000000000..a1b704d54c78 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/DurableTask.Core.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Bcl.AsyncInterfaces.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Bcl.AsyncInterfaces.dll new file mode 100644 index 000000000000..dfaeb267d4f1 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Bcl.AsyncInterfaces.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Abstractions.dll new file mode 100644 index 000000000000..ddece5596fc7 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Abstractions.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Client.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Client.dll new file mode 100644 index 000000000000..73be95e67a5a Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Client.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Worker.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Worker.dll new file mode 100644 index 000000000000..766158c690c3 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.DurableTask.Worker.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Caching.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Caching.Abstractions.dll new file mode 100644 index 000000000000..a185a73c5ba2 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Caching.Abstractions.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Caching.Memory.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Caching.Memory.dll new file mode 100644 index 000000000000..9ed681989ddb Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Caching.Memory.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Configuration.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Configuration.Abstractions.dll new file mode 100644 index 000000000000..1d617cdaaa29 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Configuration.Abstractions.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.DependencyInjection.Abstractions.dll new file mode 100644 index 000000000000..4faa08c7c52b Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.DependencyInjection.Abstractions.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Diagnostics.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Diagnostics.Abstractions.dll new file mode 100644 index 000000000000..d791524491a6 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Diagnostics.Abstractions.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.FileProviders.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.FileProviders.Abstractions.dll new file mode 100644 index 000000000000..f6ee97440ada Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.FileProviders.Abstractions.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Hosting.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Hosting.Abstractions.dll new file mode 100644 index 000000000000..d3fdc422efbd Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Hosting.Abstractions.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Logging.Abstractions.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Logging.Abstractions.dll new file mode 100644 index 000000000000..70fa37879234 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Logging.Abstractions.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Options.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Options.dll new file mode 100644 index 000000000000..1217d605b2da Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Options.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Primitives.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Primitives.dll new file mode 100644 index 000000000000..37eecdb49fc4 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Microsoft.Extensions.Primitives.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Newtonsoft.Json.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Newtonsoft.Json.dll new file mode 100644 index 000000000000..5813d8cf067a Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/Newtonsoft.Json.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Diagnostics.DiagnosticSource.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Diagnostics.DiagnosticSource.dll new file mode 100644 index 000000000000..91428545e66f Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Diagnostics.DiagnosticSource.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Diagnostics.EventLog.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Diagnostics.EventLog.dll new file mode 100644 index 000000000000..9b0d1300c339 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Diagnostics.EventLog.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.IO.Pipelines.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.IO.Pipelines.dll new file mode 100644 index 000000000000..43bbcf051172 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.IO.Pipelines.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.Core.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.Core.dll similarity index 100% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.Core.dll rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.Core.dll diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.Interfaces.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.Interfaces.dll similarity index 100% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.Interfaces.dll rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.Interfaces.dll diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.Linq.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.Linq.dll similarity index 100% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.Linq.dll rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.Linq.dll diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.PlatformServices.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.PlatformServices.dll similarity index 100% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.PlatformServices.dll rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.PlatformServices.dll diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.Providers.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.Providers.dll similarity index 100% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.Providers.dll rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.Providers.dll diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.dll similarity index 100% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/Dependencies/System.Reactive.dll rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Reactive.dll diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Text.Encodings.Web.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Text.Encodings.Web.dll new file mode 100644 index 000000000000..8b4b15aae512 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Text.Encodings.Web.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Text.Json.dll b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Text.Json.dll new file mode 100644 index 000000000000..81311a416548 Binary files /dev/null and b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/Dependencies/System.Text.Json.dll differ diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/PSGetModuleInfo.xml b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/PSGetModuleInfo.xml similarity index 71% rename from Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/PSGetModuleInfo.xml rename to Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/PSGetModuleInfo.xml index a98f05d4a295..75fde85fbdec 100644 --- a/Modules/AzureFunctions.PowerShell.Durable.SDK/1.1.0/PSGetModuleInfo.xml +++ b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/PSGetModuleInfo.xml @@ -7,9 +7,9 @@ AzureFunctions.PowerShell.Durable.SDK - 1.1.0 + 2.2.0 Module - Initial release of the Durable Functions SDK for PowerShell. This package is to be used exclusively with the Azure Functions PowerShell worker. + Durable Functions SDK for PowerShell. This package is to be used exclusively with the Azure Functions PowerShell worker. Microsoft Corporation @@ -18,12 +18,13 @@ System.Object + AnatoliB davidmrdavid - michaelpeng + andystaples (c) Microsoft Corporation. All rights reserved. -
2024-02-14T04:09:33-05:00
+
2026-02-03T17:41:18-05:00
https://github.com/Azure/azure-functions-durable-powershell/blob/main/LICENSE @@ -58,7 +59,7 @@ - DscResource + Workflow @@ -79,10 +80,6 @@ - - Workflow - - Command @@ -108,6 +105,10 @@ + + DscResource + + Function @@ -141,30 +142,30 @@ (c) Microsoft Corporation. All rights reserved. - Initial release of the Durable Functions SDK for PowerShell. This package is to be used exclusively with the Azure Functions PowerShell worker. + Durable Functions SDK for PowerShell. This package is to be used exclusively with the Azure Functions PowerShell worker. False True True - 1411 - 4017 - 1375697 - 2/14/2024 4:09:33 AM -05:00 - 2/14/2024 4:09:33 AM -05:00 - 4/21/2024 1:06:52 PM -04:00 + 3453 + 99475 + 1985687 + 2/3/2026 5:41:18 PM -05:00 + 2/3/2026 5:41:18 PM -05:00 + 3/5/2026 5:30:52 PM -05:00 Microsoft Azure Functions Serverless Cloud Workflows Durable DurableTask PSModule PSEdition_Core PSCmdlet_Invoke-DurableActivity PSCommand_Invoke-DurableActivity PSCmdlet_Invoke-DurableSubOrchestrator PSCommand_Invoke-DurableSubOrchestrator PSCmdlet_New-DurableRetryPolicy PSCommand_New-DurableRetryPolicy PSCmdlet_Set-DurableCustomStatus PSCommand_Set-DurableCustomStatus PSCmdlet_Set-FunctionInvocationContext PSCommand_Set-FunctionInvocationContext PSCmdlet_Start-DurableExternalEventListener PSCommand_Start-DurableExternalEventListener PSCmdlet_Start-DurableTimer PSCommand_Start-DurableTimer PSCmdlet_Stop-DurableTimerTask PSCommand_Stop-DurableTimerTask PSCmdlet_Wait-DurableTask PSCommand_Wait-DurableTask PSCmdlet_Get-DurableTaskResult PSCommand_Get-DurableTaskResult PSIncludes_Cmdlet PSFunction_Get-DurableStatus PSCommand_Get-DurableStatus PSFunction_New-DurableOrchestrationCheckStatusResponse PSCommand_New-DurableOrchestrationCheckStatusResponse PSFunction_Send-DurableExternalEvent PSCommand_Send-DurableExternalEvent PSFunction_Start-DurableOrchestration PSCommand_Start-DurableOrchestration PSFunction_Stop-DurableOrchestration PSCommand_Stop-DurableOrchestration PSFunction_Suspend-DurableOrchestration PSCommand_Suspend-DurableOrchestration PSFunction_Resume-DurableOrchestration PSCommand_Resume-DurableOrchestration PSIncludes_Function False - 2024-04-21T13:06:52Z - 1.1.0 + 2026-03-05T17:30:52Z + 2.2.0 Microsoft Corporation false Module - AzureFunctions.PowerShell.Durable.SDK.nuspec|_manifest\spdx_2.2\manifest.spdx.json|AzureFunctions.PowerShell.Durable.SDK.dll|AzureFunctions.PowerShell.Durable.SDK.psd1|Dependencies\DurableEngine.dll|Dependencies\Microsoft.Bcl.AsyncInterfaces.dll|Dependencies\Microsoft.DurableTask.Worker.dll|Dependencies\Microsoft.Extensions.FileProviders.Abstractions.dll|Dependencies\Microsoft.Extensions.Options.dll|Dependencies\System.Diagnostics.EventLog.dll|Dependencies\System.Reactive.Interfaces.dll|Dependencies\System.Reactive.PlatformServices.dll|_manifest\manifest.json|_manifest\spdx_2.2\manifest.spdx.json.sha256|AzureFunctions.PowerShell.Durable.SDK.psm1|Dependencies\DurableEngine.pdb|Dependencies\Microsoft.DurableTask.Abstractions.dll|Dependencies\Microsoft.Extensions.Configuration.Abstractions.dll|Dependencies\Microsoft.Extensions.Hosting.Abstractions.dll|Dependencies\Microsoft.Extensions.Primitives.dll|Dependencies\System.Reactive.Core.dll|Dependencies\System.Reactive.Linq.dll|Dependencies\System.Reactive.Providers.dll|_manifest\manifest.json.sha256|AzureFunctions.PowerShell.Durable.SDK.pdb|Dependencies\Castle.Core.dll|Dependencies\DurableTask.Core.dll|Dependencies\Microsoft.DurableTask.Client.dll|Dependencies\Microsoft.Extensions.DependencyInjection.Abstractions.dll|Dependencies\Microsoft.Extensions.Logging.Abstractions.dll|Dependencies\Newtonsoft.Json.dll|Dependencies\System.Reactive.dll + AzureFunctions.PowerShell.Durable.SDK.nuspec|Dependencies\System.Diagnostics.EventLog.dll|Dependencies\System.IO.Pipelines.dll|Dependencies\System.Reactive.Core.dll|Dependencies\System.Reactive.dll|Dependencies\System.Reactive.Interfaces.dll|Dependencies\System.Reactive.Linq.dll|Dependencies\System.Reactive.PlatformServices.dll|Dependencies\System.Reactive.Providers.dll|Dependencies\System.Text.Encodings.Web.dll|Dependencies\System.Text.Json.dll|en-US\AzureFunctions.PowerShell.Durable.SDK-help.xml|en-US\AzureFunctions.PowerShell.Durable.SDK.dll-Help.xml|AzureFunctions.PowerShell.Durable.SDK.dll|AzureFunctions.PowerShell.Durable.SDK.pdb|AzureFunctions.PowerShell.Durable.SDK.psm1|Dependencies\DurableEngine.dll|Dependencies\DurableTask.Core.dll|Dependencies\Microsoft.DurableTask.Abstractions.dll|Dependencies\Microsoft.DurableTask.Client.dll|Dependencies\Microsoft.DurableTask.Worker.dll|Dependencies\Microsoft.Extensions.Caching.Abstractions.dll|Dependencies\Microsoft.Extensions.Caching.Memory.dll|Dependencies\Microsoft.Extensions.Configuration.Abstractions.dll|Dependencies\Microsoft.Extensions.DependencyInjection.Abstractions.dll|Dependencies\Microsoft.Extensions.Diagnostics.Abstractions.dll|Dependencies\Microsoft.Extensions.FileProviders.Abstractions.dll|Dependencies\Microsoft.Extensions.Hosting.Abstractions.dll|Dependencies\Microsoft.Extensions.Logging.Abstractions.dll|Dependencies\Microsoft.Extensions.Options.dll|Dependencies\Microsoft.Extensions.Primitives.dll|Dependencies\Newtonsoft.Json.dll|Dependencies\System.Diagnostics.DiagnosticSource.dll|AzureFunctions.PowerShell.Durable.SDK.psd1|Dependencies\Castle.Core.dll|Dependencies\DurableEngine.pdb|Dependencies\Microsoft.Bcl.AsyncInterfaces.dll 841fad61-94f5-4330-89be-613d54165289 - 7.2 + 7.4 Microsoft Corporation - C:\GitHub\CIPP Workspace\CIPP-API\Modules\AzureFunctions.PowerShell.Durable.SDK\1.1.0 + /Users/johnduprey/Documents/GitHub/CIPP Workspace/CIPP-API/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0
diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/en-US/AzureFunctions.PowerShell.Durable.SDK-help.xml b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/en-US/AzureFunctions.PowerShell.Durable.SDK-help.xml new file mode 100644 index 000000000000..22879c865ea6 --- /dev/null +++ b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/en-US/AzureFunctions.PowerShell.Durable.SDK-help.xml @@ -0,0 +1,1117 @@ + + + + + Get-DurableStatus + Get + DurableStatus + + Get the status of a durable orchestration instance. + + + + Get the status of a durable orchestration instance with the given instance ID. Optionally includes execution history, history output, and input data. + + + + Get-DurableStatus + + InstanceId + + The ID of the orchestration instance to get the status for. + + String + + String + + + None + + + DurableClient + + The durable client object. If not provided, it will be retrieved from module private data. + + Object + + Object + + + None + + + ShowHistory + + When present, includes the execution history in the response. + + + SwitchParameter + + + False + + + ShowHistoryOutput + + When present, includes the output of each step in the execution history. + + + SwitchParameter + + + False + + + ShowInput + + When present, includes the input data that was provided to the orchestration instance. + + + SwitchParameter + + + False + + + + + + InstanceId + + The ID of the orchestration instance to get the status for. + + String + + String + + + None + + + DurableClient + + The durable client object. If not provided, it will be retrieved from module private data. + + Object + + Object + + + None + + + ShowHistory + + When present, includes the execution history in the response. + + SwitchParameter + + SwitchParameter + + + False + + + ShowHistoryOutput + + When present, includes the output of each step in the execution history. + + SwitchParameter + + SwitchParameter + + + False + + + ShowInput + + When present, includes the input data that was provided to the orchestration instance. + + SwitchParameter + + SwitchParameter + + + False + + + + + + System.String + + + You can pipe instance ID strings to this cmdlet to get the status of multiple orchestration instances. + + + + + + + System.Object + + + Returns a status object containing information about the durable orchestration instance, including: + - InstanceId: The unique identifier of the orchestration instance + - RuntimeStatus: The current runtime status (Running, Completed, Failed, etc.) + - Input: The input data provided to the orchestration (if -ShowInput is specified) + - Output: The output of the orchestration (if completed) + - CreatedTime: When the orchestration was created + - LastUpdatedTime: When the orchestration was last updated + - History: Execution history (if -ShowHistory is specified) + + + + + + - This cmdlet is typically used in HTTP trigger functions or other client functions to check orchestration progress. + - The InstanceId must be from an existing orchestration; invalid IDs will result in a null response. + - Use -ShowHistory to get detailed execution steps, which is useful for debugging orchestration behavior. + - The -ShowHistoryOutput parameter can produce large responses; use carefully in production environments. + - Status information includes runtime state, input/output data, creation time, and last update time. + - Orchestration status is eventually consistent and may take a moment to reflect the latest state after operations. + + + + + -------------------------- Example 1 -------------------------- + Get-DurableStatus -InstanceId "example-instance-id" + + Returns the basic status of the orchestration instance. + + + + -------------------------- Example 2 -------------------------- + Get-DurableStatus -InstanceId "example-instance-id" -ShowHistory -ShowHistoryOutput + + Returns the status with detailed execution history and output. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + New-DurableOrchestrationCheckStatusResponse + New + DurableOrchestrationCheckStatusResponse + + Create a check status response for a durable orchestration. + + + + Creates an HTTP response with status check URLs for a durable orchestration instance. This response includes URLs for checking status, terminating, suspending, resuming, and raising events. + + + + New-DurableOrchestrationCheckStatusResponse + + Request + + The HTTP request object that triggered the orchestration. + + Object + + Object + + + None + + + InstanceId + + The ID of the orchestration instance for which to create the check status response. + + String + + String + + + None + + + DurableClient + + The durable client context object used to generate management URLs for the orchestration instance. + + Object + + Object + + + None + + + + + + Request + + The HTTP request object that triggered the orchestration. + + Object + + Object + + + None + + + InstanceId + + The ID of the orchestration instance for which to create the check status response. + + String + + String + + + None + + + DurableClient + + The durable client context object used to generate management URLs for the orchestration instance. + + Object + + Object + + + None + + + + + + System.Object (Request) + + + You can pipe HTTP request objects to create status check responses for multiple orchestrations. + + + + + System.String (InstanceId) + + + You can pipe instance ID strings to generate status check responses for specific orchestration instances. + + + + + + + HttpResponseContext + + + Returns an HTTP response context with status code 202 (Accepted) and management URLs for checking orchestration status, sending external events, and terminating the orchestration. + + + + + + - This cmdlet is typically used in HTTP trigger functions after starting an orchestration to provide management URLs. + - The response includes a 202 (Accepted) status code following the standard async HTTP pattern. + - The generated URLs allow clients to check status, send events, and manage the orchestration without additional authentication. + - Store the instanceId securely if the orchestration contains sensitive data, as anyone with the URLs can manage the orchestration. + - The response follows the Durable Functions HTTP API conventions for orchestration management. + + + + + -------------------------- Example 1 -------------------------- + New-DurableOrchestrationCheckStatusResponse -Request $Request -InstanceId "example-instance-id" + + Creates a standard orchestration check status response with management URLs. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Resume-DurableOrchestration + Resume + DurableOrchestration + + Resume a suspended durable orchestration instance. + + + + Resumes a previously suspended durable orchestration instance with the specified instance ID and reason. This will continue execution from where the orchestration was suspended. + + + + Resume-DurableOrchestration + + InstanceId + + The ID of the orchestration instance to resume. + + String + + String + + + None + + + Reason + + The reason for resuming the orchestration instance. This will be recorded in the instance history. + + String + + String + + + None + + + + + + InstanceId + + The ID of the orchestration instance to resume. + + String + + String + + + None + + + Reason + + The reason for resuming the orchestration instance. This will be recorded in the instance history. + + String + + String + + + None + + + + + + System.String (InstanceId) + + + You can pipe instance ID strings to resume multiple orchestration instances. + + + + + System.String (Reason) + + + You can pipe reason strings to specify the resumption reason for orchestration instances. + + + + + + + None + + + This cmdlet does not return any output. It resumes the specified suspended orchestration instance. + + + + + + - This cmdlet can only be used in client functions, not within orchestrator or activity functions. + - Only orchestrations in a "Suspended" state can be resumed. + - The resume operation is asynchronous; the orchestration will continue from where it was suspended. + - Use Get-DurableStatus to verify the orchestration is in a "Suspended" state before attempting to resume. + - The resumption reason is helpful for tracking why an orchestration was resumed. + - Resumed orchestrations will continue with their original input and context. + + + + + -------------------------- Example 1 -------------------------- + Resume-DurableOrchestration -InstanceId "example-instance-id" -Reason "Maintenance complete" + + Resumes the orchestration instance with the provided reason. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Send-DurableExternalEvent + Send + DurableExternalEvent + + Send an external event to an orchestration instance. + + + + Send an external event with the given event name and event data to an orchestration instance with the given instance ID. The orchestration must be waiting for this event using Start-DurableExternalEventListener. + + + + Send-DurableExternalEvent + + InstanceId + + The ID of the orchestration instance that will handle the external event. + + String + + String + + + None + + + EventName + + The name of the external event. This must match the event name the orchestration is waiting for. + + String + + String + + + None + + + EventData + + The JSON-serializable data associated with the external event. + + Object + + Object + + + None + + + TaskHubName + + The TaskHubName of the orchestration instance that will handle the external event. + + String + + String + + + None + + + ConnectionName + + The name of the connection string associated with TaskHubName. + + String + + String + + + None + + + + + + InstanceId + + The ID of the orchestration instance that will handle the external event. + + String + + String + + + None + + + EventName + + The name of the external event. This must match the event name the orchestration is waiting for. + + String + + String + + + None + + + EventData + + The JSON-serializable data associated with the external event. + + Object + + Object + + + None + + + TaskHubName + + The TaskHubName of the orchestration instance that will handle the external event. + + String + + String + + + None + + + ConnectionName + + The name of the connection string associated with TaskHubName. + + String + + String + + + None + + + + + + System.String (InstanceId) + + + You can pipe instance ID strings to specify which orchestration instance should receive the external event. + + + + + System.String (EventName) + + + You can pipe event name strings to specify the name of the external event to send. + + + + + System.Object (EventData) + + + You can pipe objects containing event data to be sent with the external event. + + + + + + + None + + + This cmdlet does not return any output. It sends the specified external event to the target orchestration instance. + + + + + + - This cmdlet is typically used in HTTP trigger functions or other client functions to send events to running orchestrations. + - The target orchestration must be actively listening for the event using Start-DurableExternalEventListener. + - Event names are case-sensitive and must match exactly between sender and listener. + - Events sent to orchestrations that are not listening will be queued and delivered when a listener is started. + - Large event data should be stored in external storage and referenced by URL to avoid serialization limits. + - External events provide a way to implement human-in-the-loop patterns and real-time orchestration control. + + + + + -------------------------- Example 1 -------------------------- + Send-DurableExternalEvent -InstanceId "example-instance-id" -EventName "ApprovalReceived" -EventData "approved" + + Sends an external event to the orchestration instance. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Start-DurableOrchestration + Start + DurableOrchestration + + Start a durable orchestration. + + + + Start a durable orchestration with the given function name and input value. Returns the instance ID of the newly started orchestration. + + + + Start-DurableOrchestration + + FunctionName + + The name of the orchestration function you want to start. + + String + + String + + + None + + + InputObject + + The input value that will be passed to the orchestration function. + + Object + + Object + + + None + + + DurableClient + + The durable client object. If not provided, it will be retrieved from module private data. + + Object + + Object + + + None + + + InstanceId + + Optional custom instance ID for the orchestration. If not provided, a new GUID will be generated. + + String + + String + + + None + + + Version + + Optional orchestration version. The provided value will be available as `$Context.Version` within the orchestrator function context. If not specified, the default version specified by the `defaultVersion` property in the Function app's host.json will be used. + + String + + String + + + None + + + + + + FunctionName + + The name of the orchestration function you want to start. + + String + + String + + + None + + + InputObject + + The input value that will be passed to the orchestration function. + + Object + + Object + + + None + + + DurableClient + + The durable client object. If not provided, it will be retrieved from module private data. + + Object + + Object + + + None + + + InstanceId + + Optional custom instance ID for the orchestration. If not provided, a new GUID will be generated. + + String + + String + + + None + + + Version + + Optional orchestration version. The provided value will be available as `$Context.Version` within the orchestrator function context. If not specified, the default version specified by the `defaultVersion` property in the Function app's host.json will be used. + + String + + String + + + None + + + + + + System.String (FunctionName) + + + You can pipe strings to the -FunctionName parameter to specify the orchestrator function to start. + + + + + System.Object (InputObject) + + + You can pipe objects to the -InputObject parameter to provide input data for the orchestration function. + + + + + System.String (InstanceId) + + + You can pipe strings to the -InstanceId parameter to specify a custom instance ID for the orchestration. + + + + + System.String (Version) + + + You can pipe strings to the -Version parameter to specify a version for the orchestration function. + + + + + + + System.String + + + Returns the instance ID of the started orchestration as a string. This ID can be used to check the status, send external events, or manage the orchestration instance. + + + + + + - This cmdlet is typically used in HTTP trigger functions or other client functions to start new orchestrations. + - The returned instance ID can be used with other cmdlets like Get-DurableStatus, Send-DurableExternalEvent, or Stop-DurableOrchestration. + - If you don't specify an InstanceId, a new GUID will be automatically generated. + - Custom instance IDs should be unique to avoid conflicts with existing orchestrations. + - Large input data should be stored in external storage and referenced by URL to avoid serialization limits. + - The orchestration function name must match a function defined in your Azure Functions app with an orchestration trigger. + + + + + -------------------------- Example 1 -------------------------- + Start-DurableOrchestration -FunctionName "OrchestratorFunction" -InputObject "input value for the orchestration function" +Returns the instance ID of the new orchestration. + + + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Stop-DurableOrchestration + Stop + DurableOrchestration + + Stop (terminate) a running durable orchestration instance. + + + + Terminates a running durable orchestration instance with the specified instance ID and reason. This is a permanent action that cannot be undone. + + + + Stop-DurableOrchestration + + InstanceId + + The ID of the orchestration instance to terminate. + + String + + String + + + None + + + Reason + + The reason for terminating the orchestration instance. This will be recorded in the instance history. + + String + + String + + + None + + + + + + InstanceId + + The ID of the orchestration instance to terminate. + + String + + String + + + None + + + Reason + + The reason for terminating the orchestration instance. This will be recorded in the instance history. + + String + + String + + + None + + + + + + System.String (InstanceId) + + + You can pipe instance ID strings to terminate multiple orchestration instances. + + + + + System.String (Reason) + + + You can pipe reason strings to specify the termination reason for orchestration instances. + + + + + + + None + + + This cmdlet does not return any output. It terminates the specified orchestration instance. + + + + + + - This cmdlet can only be used in client functions, not within orchestrator or activity functions. + - Termination is permanent and cannot be undone; the orchestration cannot be resumed after termination. + - The termination is asynchronous; the orchestration may take some time to actually stop. + - Terminated orchestrations will have a final status of "Terminated" when checked with Get-DurableStatus. + - Use descriptive termination reasons to help with debugging and monitoring. + - Consider using Suspend-DurableOrchestration if you need to temporarily halt an orchestration that can be resumed later. + + + + + -------------------------- Example 1 -------------------------- + Stop-DurableOrchestration -InstanceId "example-instance-id" -Reason "User requested termination" + + Terminates the orchestration instance with the provided reason. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Suspend-DurableOrchestration + Suspend + DurableOrchestration + + Suspend a running durable orchestration instance. + + + + Suspends a running durable orchestration instance with the specified instance ID and reason. A suspended instance can be resumed later using Resume-DurableOrchestration. + + + + Suspend-DurableOrchestration + + InstanceId + + The ID of the orchestration instance to suspend. + + String + + String + + + None + + + Reason + + The reason for suspending the orchestration instance. This will be recorded in the instance history. + + String + + String + + + None + + + + + + InstanceId + + The ID of the orchestration instance to suspend. + + String + + String + + + None + + + Reason + + The reason for suspending the orchestration instance. This will be recorded in the instance history. + + String + + String + + + None + + + + + + System.String (InstanceId) + + + You can pipe instance ID strings to suspend multiple orchestration instances. + + + + + System.String (Reason) + + + You can pipe reason strings to specify the suspension reason for orchestration instances. + + + + + + + None + + + This cmdlet does not return any output. It suspends the specified orchestration instance. + + + + + + - This cmdlet can only be used in client functions, not within orchestrator or activity functions. + - Suspended orchestrations can be resumed later using Resume-DurableOrchestration with the same instance ID. + - The suspension is asynchronous; the orchestration may take some time to actually suspend. + - Suspended orchestrations will have a status of "Suspended" when checked with Get-DurableStatus. + - Use descriptive suspension reasons to help with monitoring and maintenance. + - Suspension is useful for implementing manual approval workflows or maintenance windows. + + + + + -------------------------- Example 1 -------------------------- + Suspend-DurableOrchestration -InstanceId "example-instance-id" -Reason "Maintenance window" + + Suspends the orchestration instance with the provided reason. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + \ No newline at end of file diff --git a/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/en-US/AzureFunctions.PowerShell.Durable.SDK.dll-Help.xml b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/en-US/AzureFunctions.PowerShell.Durable.SDK.dll-Help.xml new file mode 100644 index 000000000000..1ee943dd965b --- /dev/null +++ b/Modules/AzureFunctions.PowerShell.Durable.SDK/2.2.0/en-US/AzureFunctions.PowerShell.Durable.SDK.dll-Help.xml @@ -0,0 +1,1412 @@ + + + + + Get-DurableTaskResult + Get + DurableTaskResult + + Gets the result value from a completed durable task. + + + + Retrieves the result value from a completed durable task. This cmdlet blocks execution until the specified task completes and then returns the task's result value. The type and content of the returned result depend on what the underlying activity function or sub-orchestrator returned. This is typically used within orchestrator functions to obtain the output of previously scheduled durable tasks. + + + + Get-DurableTaskResult + + Task + + The durable task object whose result you want to retrieve. This should be a task returned from cmdlets like Invoke-DurableActivity, Invoke-DurableSubOrchestrator, Start-DurableTimer, or Start-DurableExternalEventListener. + + DurableTask + + DurableTask + + + None + + + + + + Task + + The durable task object whose result you want to retrieve. This should be a task returned from cmdlets like Invoke-DurableActivity, Invoke-DurableSubOrchestrator, Start-DurableTimer, or Start-DurableExternalEventListener. + + DurableTask + + DurableTask + + + None + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + System.Object + + + Returns the result value from the completed durable task. The type and content depend on what the underlying activity function or sub-orchestrator returned. + + + + + + - This cmdlet is typically used within orchestrator functions to retrieve results from tasks created with the -NoWait parameter. + - The cmdlet blocks execution until the specified task completes, which maintains the deterministic nature of orchestrations. + - If a task fails, this cmdlet will throw an exception with details about the failure. + - Tasks should be created within the same orchestration context where this cmdlet is called. + - Use Wait-DurableTask when you need to wait for multiple tasks with timeout or any/all semantics. + + + + + -------------------------- Example 1 -------------------------- + $task = Invoke-DurableActivity -FunctionName "GetUserData" -Input @{ UserId = 123 } -NoWait +$result = Get-DurableTaskResult -Task $task +Write-Host "User data: $result" + + This example demonstrates invoking a durable activity function asynchronously with -NoWait to get a task, then using Get-DurableTaskResult to retrieve the result from the task. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Invoke-DurableActivity + Invoke + DurableActivity + + Invokes a durable activity function. + + + + Schedules a durable activity function for execution. By default, this cmdlet blocks until the activity completes and returns the result directly. Use the -NoWait switch to return a task object immediately without waiting for completion, allowing the orchestrator to schedule multiple activities concurrently and retrieve their results later using Get-DurableTaskResult or Wait-DurableTask. + + + + Invoke-DurableActivity + + FunctionName + + The name of the activity function to invoke. This should match the name of an activity function defined in your Azure Functions app. + + String + + String + + + None + + + Input + + The input data to pass to the activity function. This can be any object that will be serialized and passed as input to the activity function. + + Object + + Object + + + None + + + NoWait + + When specified, the cmdlet returns a task object immediately without waiting for completion. By default, the cmdlet blocks and waits for the activity to complete before returning the result. + + + SwitchParameter + + + False + + + RetryOptions + + A retry policy object created with New-DurableRetryPolicy that defines how the activity should be retried if it fails. If not specified, the activity will not be retried on failure. + + RetryPolicy + + RetryPolicy + + + None + + + + + + FunctionName + + The name of the activity function to invoke. This should match the name of an activity function defined in your Azure Functions app. + + String + + String + + + None + + + Input + + The input data to pass to the activity function. This can be any object that will be serialized and passed as input to the activity function. + + Object + + Object + + + None + + + NoWait + + When specified, the cmdlet returns a task object immediately without waiting for completion. By default, the cmdlet blocks and waits for the activity to complete before returning the result. + + SwitchParameter + + SwitchParameter + + + False + + + RetryOptions + + A retry policy object created with New-DurableRetryPolicy that defines how the activity should be retried if it fails. If not specified, the activity will not be retried on failure. + + RetryPolicy + + RetryPolicy + + + None + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + System.Object + + + Returns the result of the activity function execution by default. If -NoWait is specified, returns a DurableTask object that can be used with Get-DurableTaskResult or Wait-DurableTask to retrieve the result later. + + + + + + - This cmdlet can only be used within orchestrator functions, not in activity functions or client functions. + - The activity function name must match a function defined in your Azure Functions app. + - Activity functions are automatically retried on transient failures when a RetryOptions policy is specified. + - Activity functions should be stateless and idempotent. + - Use the -NoWait parameter when you need to invoke multiple activities concurrently (fan-out pattern). + + + + + ----- Example 1 - Synchronous execution (default behavior) ----- + $result = Invoke-DurableActivity -FunctionName "ProcessData" -Input @{ Data = "example"; ProcessType = "validation" } +Write-Host "Processing result: $result" + + This example shows the default behavior where the cmdlet blocks until completion and returns the result directly. + + + + ------- Example 2 - Asynchronous execution with -NoWait ------- + $task = Invoke-DurableActivity -FunctionName "ProcessData" -Input @{ Data = "example"; ProcessType = "validation" } -NoWait +$result = Get-DurableTaskResult -Task $task +Write-Host "Processing result: $result" + + This example shows how to invoke a durable activity function asynchronously using -NoWait, which returns a task object that can be awaited later. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Invoke-DurableSubOrchestrator + Invoke + DurableSubOrchestrator + + Invokes a sub-orchestrator function. + + + + Invokes a sub-orchestrator function. By default, this cmdlet blocks until the sub-orchestrator completes and returns the result directly. Use the -NoWait switch to return a task object immediately without waiting for completion, allowing you to orchestrate multiple sub-orchestrators concurrently. Sub-orchestrators enable composition of orchestrations and help manage complexity in large workflow scenarios. + + + + Invoke-DurableSubOrchestrator + + FunctionName + + The name of the orchestrator function to invoke as a sub-orchestrator. This should match the name of an orchestrator function defined in your Azure Functions app. + + String + + String + + + None + + + Input + + The input data to pass to the sub-orchestrator function. This can be any object that will be serialized and passed as input to the sub-orchestrator. + + Object + + Object + + + None + + + InstanceId + + An optional instance ID for the sub-orchestrator. If not specified, a unique instance ID will be automatically generated for the sub-orchestrator. + + String + + String + + + None + + + Version + + An optional version string for the sub-orchestrator function. When specified, this version overrides the default version configured in host.json for this specific sub-orchestrator invocation. This allows you to invoke specific versions of orchestrator functions. + + String + + String + + + None + + + NoWait + + When specified, the cmdlet returns a task object immediately without waiting for completion. By default, the cmdlet blocks and waits for the sub-orchestrator to complete before returning the result. + + + SwitchParameter + + + False + + + RetryOptions + + A retry policy object created with New-DurableRetryPolicy that defines how the sub-orchestrator should be retried if it fails. If not specified, the sub-orchestrator will not be retried on failure. + + RetryPolicy + + RetryPolicy + + + None + + + + + + FunctionName + + The name of the orchestrator function to invoke as a sub-orchestrator. This should match the name of an orchestrator function defined in your Azure Functions app. + + String + + String + + + None + + + Input + + The input data to pass to the sub-orchestrator function. This can be any object that will be serialized and passed as input to the sub-orchestrator. + + Object + + Object + + + None + + + InstanceId + + An optional instance ID for the sub-orchestrator. If not specified, a unique instance ID will be automatically generated for the sub-orchestrator. + + String + + String + + + None + + + Version + + An optional version string for the sub-orchestrator function. When specified, this version overrides the default version configured in host.json for this specific sub-orchestrator invocation. This allows you to invoke specific versions of orchestrator functions. + + String + + String + + + None + + + NoWait + + When specified, the cmdlet returns a task object immediately without waiting for completion. By default, the cmdlet blocks and waits for the sub-orchestrator to complete before returning the result. + + SwitchParameter + + SwitchParameter + + + False + + + RetryOptions + + A retry policy object created with New-DurableRetryPolicy that defines how the sub-orchestrator should be retried if it fails. If not specified, the sub-orchestrator will not be retried on failure. + + RetryPolicy + + RetryPolicy + + + None + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + System.Object + + + Returns the result of the sub-orchestrator execution by default. If -NoWait is specified, returns a DurableTask object that can be used with Get-DurableTaskResult or Wait-DurableTask to retrieve the result later. + + + + + + - This cmdlet can only be used within orchestrator functions, not in activity functions or client functions. + - Sub-orchestrators enable composition and modularity in complex workflow scenarios. + - Each sub-orchestrator runs as an independent orchestration instance with its own instance ID. + - Use the -NoWait parameter when you need to invoke multiple sub-orchestrators concurrently. + - Sub-orchestrators inherit the fault-tolerance and replay characteristics of the parent orchestration. + - The sub-orchestrator function name must match a function defined in your Azure Functions app with an orchestration trigger. + - The -Version parameter allows you to invoke specific versions of orchestrator functions, overriding the default version from host.json. + - Consider using sub-orchestrators to break down complex workflows into manageable, reusable components. + + + + + ----- Example 1 - Synchronous execution (default behavior) ----- + $batchResult = Invoke-DurableSubOrchestrator -FunctionName "ChildOrchestrator" -Input @{ BatchId = "batch123"; Items = @("item1", "item2", "item3") } +Write-Host "Sub-orchestrator completed with result: $batchResult" + + This example shows the default behavior where the cmdlet blocks until completion and returns the result directly. + + + + ------- Example 2 - Asynchronous execution with -NoWait ------- + $subOrchestratorTask = Invoke-DurableSubOrchestrator -FunctionName "ChildOrchestrator" -Input @{ BatchId = "batch123"; Items = @("item1", "item2", "item3") } -NoWait +$batchResult = Get-DurableTaskResult -Task $subOrchestratorTask +Write-Host "Sub-orchestrator completed with result: $batchResult" + + This example shows how to invoke a sub-orchestrator function asynchronously using -NoWait, which returns a task object that can be awaited later. + + + + --------------- Example 3 - Specifying a version --------------- + $result = Invoke-DurableSubOrchestrator -FunctionName "ChildOrchestrator" -Version "2.0" -Input @{ ProcessId = "proc456" } +Write-Host "Sub-orchestrator (version 2.0) completed with result: $result" + + This example shows how to invoke a sub-orchestrator with a specific version, overriding the default version configured in host.json. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + New-DurableRetryPolicy + New + DurableRetryPolicy + + Creates a new retry policy for durable activity functions and sub-orchestrators. + + + + Creates a retry policy object that can be used with durable activity functions and sub-orchestrators to handle transient failures. The retry policy defines how many times an operation should be retried, the delay between retries, and optionally a maximum retry interval and backoff coefficient. This helps make orchestrations more resilient to temporary failures in downstream services or activities. + + + + New-DurableRetryPolicy + + BackoffCoefficient + + The coefficient used to calculate exponential backoff between retry attempts. Must be greater than 1.0. Default is 2.0, which doubles the delay between each retry attempt. + + Double + + Double + + + None + + + FirstRetryInterval + + The initial retry interval in seconds. This is the delay before the first retry attempt. + + TimeSpan + + TimeSpan + + + None + + + MaxNumberOfAttempts + + The maximum number of retry attempts. Must be a positive integer. + + Int32 + + Int32 + + + None + + + MaxRetryInterval + + The maximum retry interval in seconds. Retry intervals will not exceed this value regardless of the backoff coefficient. + + TimeSpan + + TimeSpan + + + None + + + RetryTimeout + + The total timeout for all retry attempts as a TimeSpan. If this timeout is exceeded, no further retries will be attempted. + + TimeSpan + + TimeSpan + + + None + + + + + + BackoffCoefficient + + The coefficient used to calculate exponential backoff between retry attempts. Must be greater than 1.0. Default is 2.0, which doubles the delay between each retry attempt. + + Double + + Double + + + None + + + FirstRetryInterval + + The initial retry interval in seconds. This is the delay before the first retry attempt. + + TimeSpan + + TimeSpan + + + None + + + MaxNumberOfAttempts + + The maximum number of retry attempts. Must be a positive integer. + + Int32 + + Int32 + + + None + + + MaxRetryInterval + + The maximum retry interval in seconds. Retry intervals will not exceed this value regardless of the backoff coefficient. + + TimeSpan + + TimeSpan + + + None + + + RetryTimeout + + The total timeout for all retry attempts as a TimeSpan. If this timeout is exceeded, no further retries will be attempted. + + TimeSpan + + TimeSpan + + + None + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + RetryPolicy + + + Returns a RetryPolicy object that can be used with Invoke-DurableActivity or Invoke-DurableSubOrchestrator to specify retry behavior for failed operations. + + + + + + - Retry policies help make orchestrations more resilient to transient failures in downstream services. + - Retry policies work with both Invoke-DurableActivity and Invoke-DurableSubOrchestrator cmdlets. + - Failed attempts will be logged in the orchestration history for debugging purposes. + + + + + -------------------------- Example 1 -------------------------- + $retryPolicy = New-DurableRetryPolicy -MaxNumberOfAttempts 5 -FirstRetryInterval (New-TimeSpan -Seconds 30) -BackoffCoefficient 2.0 +$task = Invoke-DurableActivity -FunctionName "UnreliableOperation" -Input $data -RetryOptions $retryPolicy -NoWait +$result = Get-DurableTaskResult -Task $task + + This example creates a retry policy with 5 maximum attempts, starting with a 30-second interval and doubling the delay with each retry, then uses it with a durable activity invoked asynchronously. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Set-DurableCustomStatus + Set + DurableCustomStatus + + Sets a custom status value for the current durable orchestration instance. + + + + Sets a custom status value for the current durable orchestration instance. This status can be retrieved by external clients using the orchestration management APIs to monitor the progress or state of the orchestration. The custom status is useful for providing meaningful progress updates or state information that can be queried from outside the orchestration function. + + + + Set-DurableCustomStatus + + CustomStatus + + A custom object containing status information that will be available when querying the orchestration instance status. This can include progress indicators, current phase, error messages, or any other relevant status data. + + Object + + Object + + + None + + + + + + CustomStatus + + A custom object containing status information that will be available when querying the orchestration instance status. This can include progress indicators, current phase, error messages, or any other relevant status data. + + Object + + Object + + + None + + + + + + System.Object + + + You can pipe objects directly to this cmdlet to set them as the custom status for the current orchestration instance. + + + + + + + None + + + This cmdlet does not return any output. It sets the custom status for the current orchestration instance. + + + + + + - This cmdlet can only be used within orchestrator functions, not in activity functions or client functions. + - Custom status is visible when querying orchestration status with Get-DurableStatus. + - Status updates are useful for providing progress information to external monitoring systems. + - The status object will be JSON-serialized, so it should contain serializable data types. + - Custom status is preserved across orchestration replays and checkpoints. + - Keep status objects reasonably small to avoid performance impacts during serialization. + + + + + -------------------------- Example 1 -------------------------- + Set-DurableCustomStatus -CustomStatus @{ Phase = "Processing"; Progress = 45; ItemsProcessed = 90; TotalItems = 200 } +# Continue with orchestration logic... +Set-DurableCustomStatus -CustomStatus @{ Phase = "Finalizing"; Progress = 95; ItemsProcessed = 190; TotalItems = 200 } + + This example shows how to set custom status information during an orchestration to track processing progress and phase. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Set-FunctionInvocationContext + Set + FunctionInvocationContext + + INTERNAL USE ONLY - Sets the function invocation context for the current PowerShell function execution. + + + + WARNING: This cmdlet is for internal use by the Durable Functions runtime only. Do not call this cmdlet directly in your orchestrator or activity functions. This cmdlet is used internally by the Durable Functions runtime to establish the execution context that enables durable orchestration capabilities. It provides the necessary context for orchestrator functions to interact with the Durable Functions framework, including task scheduling and state management. + Calling this cmdlet directly in user code may interfere with the runtime's operation and could lead to unpredictable behavior or runtime errors. + + + + Set-FunctionInvocationContext + + Clear + + A switch parameter that, when specified, clears the current function invocation context. For internal SDK use only. + + + SwitchParameter + + + False + + + + Set-FunctionInvocationContext + + DurableClient + + The durable client context object used for client operations. For internal SDK use only. + + Object + + Object + + + None + + + + Set-FunctionInvocationContext + + OrchestrationContext + + The orchestration context object containing the current orchestration state and capabilities. For internal SDK use only. + + String + + String + + + None + + + + + + Clear + + A switch parameter that, when specified, clears the current function invocation context. For internal SDK use only. + + SwitchParameter + + SwitchParameter + + + False + + + DurableClient + + The durable client context object used for client operations. For internal SDK use only. + + Object + + Object + + + None + + + OrchestrationContext + + The orchestration context object containing the current orchestration state and capabilities. For internal SDK use only. + + String + + String + + + None + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + None + + + This cmdlet does not return any output. It sets the function invocation context for use with durable function operations. + + + + + + + + + + + -------------------------- Example 1 -------------------------- + # Internal use only - example for SDK development +Set-FunctionInvocationContext -OrchestrationContext $durableOrchestrationContext + + This cmdlet is for internal SDK use only and should not be called directly in user orchestration functions. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Start-DurableExternalEventListener + Start + DurableExternalEventListener + + Starts listening for an external event with a specified name and returns a task that will complete when the event is received. + + + + Creates a task that waits for an external event with the specified name to be raised for the current orchestration instance. By default, this cmdlet blocks until the external event is received and returns the event data directly. Use the -NoWait switch to return a task object immediately that can be awaited later. External events enable building interactive workflows and human-in-the-loop scenarios. + + + + Start-DurableExternalEventListener + + EventName + + The name of the external event to listen for. This must match the event name used when sending the external event to the orchestration instance. + + String + + String + + + None + + + NoWait + + A switch parameter that, when specified, starts the external event listener without waiting for the event. Returns a task that can be awaited later. + + + SwitchParameter + + + False + + + + + + EventName + + The name of the external event to listen for. This must match the event name used when sending the external event to the orchestration instance. + + String + + String + + + None + + + NoWait + + A switch parameter that, when specified, starts the external event listener without waiting for the event. Returns a task that can be awaited later. + + SwitchParameter + + SwitchParameter + + + False + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + DurableTask + + + Returns a DurableTask object that represents the external event listener. This task can be used with Wait-DurableTask to wait for the external event to be received. + + + + + + - This cmdlet can only be used within orchestrator functions, not in activity functions or client functions. + - External events are sent to orchestrations using the Send-DurableExternalEvent cmdlet from client functions. + - Event listeners are fault-tolerant and will survive orchestration replays and Azure Functions host restarts. + - Multiple listeners can wait for the same event name within a single orchestration. + - Use the -NoWait parameter when implementing timeout patterns or waiting for multiple different events. + - Event data is preserved across orchestration replays, ensuring exactly-once delivery semantics. + - The event name is case-sensitive and must match exactly between the listener and sender. + + + + + ----- Example 1 - Synchronous execution (default behavior) ----- + $approvalData = Start-DurableExternalEventListener -EventName "UserApproval" +if ($approvalData.Approved) { /* proceed */ } else { /* handle rejection */ } + + This example shows the default behavior where the cmdlet blocks until the external event is received and returns the event data directly. + + + + ------- Example 2 - Asynchronous execution with -NoWait ------- + $eventListener = Start-DurableExternalEventListener -EventName "UserApproval" -NoWait +# Continue with other orchestration logic... +$approvalData = Get-DurableTaskResult -Task $eventListener +if ($approvalData.Approved) { /* proceed */ } else { /* handle rejection */ } + + This example starts listening for an external event asynchronously using -NoWait, allowing other orchestration logic to execute while waiting for the event. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Start-DurableTimer + Start + DurableTimer + + Starts a durable timer that will complete after the specified duration. + + + + Creates a durable timer that will complete after the specified duration. By default, this cmdlet blocks until the timer fires and returns completion status. Use the -NoWait switch to return a task object immediately that can be awaited later. Durable timers are fault-tolerant and will survive orchestration replays and restarts, making them the recommended way to implement delays in durable orchestrations. + + + + Start-DurableTimer + + Duration + + The duration to wait before the timer fires, specified as a TimeSpan object. Alternative to using FireAt parameter. + + TimeSpan + + TimeSpan + + + None + + + NoWait + + A switch parameter that, when specified, starts the timer without waiting for it to complete. Returns a task that can be awaited or cancelled later. + + + SwitchParameter + + + False + + + + + + Duration + + The duration to wait before the timer fires, specified as a TimeSpan object. Alternative to using FireAt parameter. + + TimeSpan + + TimeSpan + + + None + + + NoWait + + A switch parameter that, when specified, starts the timer without waiting for it to complete. Returns a task that can be awaited or cancelled later. + + SwitchParameter + + SwitchParameter + + + False + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + DurableTask + + + Returns a DurableTask object representing the timer. This task can be used with Wait-DurableTask to wait for the timer to complete or with Stop-DurableTimerTask to cancel it. + + + + + + - This cmdlet can only be used within orchestrator functions, not in activity functions or client functions. + - Durable timers are fault-tolerant and will survive orchestration replays and Azure Functions host restarts. + - Use durable timers instead of Start-Sleep or similar delay mechanisms in orchestrator functions to maintain deterministic replay behavior. + - Timer tasks can be cancelled using Stop-DurableTimerTask if created with the -NoWait parameter. + - The maximum timer duration is limited by the orchestration timeout configuration of your Azure Functions app. + - Timers created with -NoWait return immediately and can be used in timeout patterns with Wait-DurableTask -Any. + + + + + ----- Example 1 - Synchronous execution (default behavior) ----- + $duration = New-TimeSpan -Minutes 30 +Start-DurableTimer -Duration $duration +Write-Host "Timer completed, continuing with scheduled operation" + + This example shows the default behavior where the cmdlet blocks until the timer fires. + + + + ------- Example 2 - Asynchronous execution with -NoWait ------- + $duration = New-TimeSpan -Minutes 30 +$timerTask = Start-DurableTimer -Duration $duration -NoWait +# Continue with other orchestration logic... +Wait-DurableTask -Task $timerTask +Write-Host "Timer completed, continuing with scheduled operation" + + This example creates a timer that will fire 30 minutes from now using -NoWait, allowing other logic to execute while the timer runs. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Stop-DurableTimerTask + Stop + DurableTimerTask + + Stops (cancels) a running durable timer task. + + + + Cancels a running durable timer task before it completes. This is useful for implementing timeout patterns or canceling scheduled delays when certain conditions are met. Once a timer task is stopped, it will not fire and any orchestration code waiting on the timer will need to handle the cancellation appropriately. This cmdlet is typically used in conjunction with Wait-DurableTask to implement race conditions between timers and other operations. + + + + Stop-DurableTimerTask + + Task + + The timer task object returned from Start-DurableTimer that should be cancelled. The task must be in a running state to be successfully cancelled. + + DurableTimerTask + + DurableTimerTask + + + None + + + + + + Task + + The timer task object returned from Start-DurableTimer that should be cancelled. The task must be in a running state to be successfully cancelled. + + DurableTimerTask + + DurableTimerTask + + + None + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + None + + + This cmdlet does not return any output. It cancels the specified durable timer task. + + + + + + - This cmdlet is used to implement timeout patterns and early cancellation scenarios in orchestrations. + - Once a timer task is stopped, any code waiting on it should handle the cancellation appropriately. + - Timer cancellation is commonly used in race conditions between timers and other operations. + - Only running timer tasks can be successfully cancelled; completed timers cannot be stopped. + - Use this cmdlet with Wait-DurableTask to implement sophisticated timeout and cancellation patterns. + + + + + -------------------------- Example 1 -------------------------- + $timerTask = Start-DurableTimer -Duration (New-TimeSpan -Hours 1) -NoWait +# Later, if condition is met, cancel the timer +if ($conditionMet) { + Stop-DurableTimerTask -Task $timerTask + Write-Host "Timer cancelled due to early completion" +} + + This example starts a timer for 1 hour using -NoWait to get a task object, then cancels it early if a certain condition is met, preventing unnecessary waiting. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + + + Wait-DurableTask + Wait + DurableTask + + Waits for one or more durable tasks to complete and returns their results. + + + + Waits for one or more durable tasks to complete before continuing orchestration execution. By default, waits for all specified tasks to complete. When the -Any switch is used, waits for any one of the tasks to complete. This cmdlet is used within orchestrator functions to coordinate multiple asynchronous operations and retrieve their results. + + + + Wait-DurableTask + + Any + + When specified, the cmdlet waits for any one of the provided tasks to complete. By default, the cmdlet waits for all tasks to complete before returning. + + + SwitchParameter + + + False + + + NoWait + + When specified, the cmdlet returns immediately without waiting for the tasks to complete. This is useful for scheduling the wait operation itself as a task. + + + SwitchParameter + + + False + + + Task + + An array of durable task objects to wait for. These should be tasks returned from cmdlets like Invoke-DurableActivity, Invoke-DurableSubOrchestrator, Start-DurableTimer, or Start-DurableExternalEventListener. + + DurableTask[] + + DurableTask[] + + + None + + + + + + Any + + When specified, the cmdlet waits for any one of the provided tasks to complete. By default, the cmdlet waits for all tasks to complete before returning. + + SwitchParameter + + SwitchParameter + + + False + + + NoWait + + When specified, the cmdlet returns immediately without waiting for the tasks to complete. This is useful for scheduling the wait operation itself as a task. + + SwitchParameter + + SwitchParameter + + + False + + + Task + + An array of durable task objects to wait for. These should be tasks returned from cmdlets like Invoke-DurableActivity, Invoke-DurableSubOrchestrator, Start-DurableTimer, or Start-DurableExternalEventListener. + + DurableTask[] + + DurableTask[] + + + None + + + + + + None + + + This cmdlet does not accept pipeline input. All parameters must be specified directly. + + + + + + + System.Object + + + Returns the completed task object(s), not the task results. If waiting for a single task, returns the task object directly. If waiting for multiple tasks, returns an array of task objects in the same order as the input tasks. To get the actual results from the tasks, use Get-DurableTaskResult on the returned task objects. + + + + + + - This cmdlet can only be used within orchestrator functions, not in activity functions or client functions. + - When using the -Any parameter, only the first completed task object is returned. Other tasks continue running in the background. + - Tasks passed to this cmdlet must be created with the -NoWait parameter from other durable cmdlets. + - The cmdlet is fault-tolerant and will survive orchestration replays and restarts. + - When waiting for multiple tasks without -Any, task objects are returned in the same order as the input tasks, regardless of completion order. + - This cmdlet returns task objects, not task results. Use Get-DurableTaskResult to retrieve the actual results from completed tasks. + - Use this cmdlet to implement common patterns like fan-out/fan-in, timeouts, and race conditions in orchestrations. + + + + + -------------------------- Example 1 -------------------------- + $task1 = Invoke-DurableActivity -FunctionName "Step1" -Input "data1" -NoWait +$task2 = Invoke-DurableActivity -FunctionName "Step2" -Input "data2" -NoWait +$completedTasks = Wait-DurableTask -Task @($task1, $task2) + +# Get the actual results from the completed tasks +$results = @() +foreach ($task in $completedTasks) { + $results += Get-DurableTaskResult -Task $task +} +Write-Host "Both tasks completed with results: $results" + + This example demonstrates waiting for multiple durable activity tasks to complete. Note that Wait-DurableTask returns the task objects themselves, not the results. To get the actual activity results, you need to use Get-DurableTaskResult on each completed task. + + + + -------------------------- Example 2 -------------------------- + $task1 = Invoke-DurableActivity -FunctionName "FastOperation" -Input $data1 -NoWait +$task2 = Invoke-DurableActivity -FunctionName "SlowOperation" -Input $data2 -NoWait +$firstCompletedTask = Wait-DurableTask -Task @($task1, $task2) -Any + +# Determine which task completed first and get its result +if ($firstCompletedTask -eq $task1) { + $activityResult = Get-DurableTaskResult -Task $firstCompletedTask + Write-Host "FastOperation completed first with result: $activityResult" +} elseif ($firstCompletedTask -eq $task2) { + $activityResult = Get-DurableTaskResult -Task $firstCompletedTask + Write-Host "SlowOperation completed first with result: $activityResult" +} else { + # This block should never be hit + Write-Host "Unexpected task completion" +} + + This example demonstrates waiting for any one of the tasks to complete using the -Any parameter. The cmdlet returns the first completed task object (not the result), which you can then compare to determine which task finished first and retrieve its actual result using Get-DurableTaskResult. + + + + + + Durable Functions for PowerShell + https://github.com/Azure/azure-functions-durable-powershell + + + + \ No newline at end of file diff --git a/Modules/CIPPCore/Public/Alerts/Get-CIPPAlertMFAAdmins.ps1 b/Modules/CIPPCore/Public/Alerts/Get-CIPPAlertMFAAdmins.ps1 index 1ee7decbbe2b..df88f925d8af 100644 --- a/Modules/CIPPCore/Public/Alerts/Get-CIPPAlertMFAAdmins.ps1 +++ b/Modules/CIPPCore/Public/Alerts/Get-CIPPAlertMFAAdmins.ps1 @@ -18,7 +18,7 @@ function Get-CIPPAlertMFAAdmins { } } if (!$DuoActive) { - $MFAReport = try { Get-CIPPMFAStateReport -TenantFilter $TenantFilter } catch { $null } + $MFAReport = try { Get-CIPPMFAStateReport -TenantFilter $TenantFilter | Where-Object { $_.DisplayName -ne 'On-Premises Directory Synchronization Service Account' } } catch { $null } $IncludeDisabled = [System.Convert]::ToBoolean($InputValue) # Check 1: Admins with no MFA registered — prefer cache, fall back to live Graph @@ -51,6 +51,7 @@ function Get-CIPPAlertMFAAdmins { $UnenforcedAdmins = $UnenforcedAdmins | Where-Object { $_.ID -notin $JITAdminIds } } + $AlertData = [System.Collections.Generic.List[PSCustomObject]]::new() foreach ($user in $Users) { diff --git a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-CIPPDBCacheApplyBatch.ps1 b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-CIPPDBCacheApplyBatch.ps1 new file mode 100644 index 000000000000..513ce4235499 --- /dev/null +++ b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-CIPPDBCacheApplyBatch.ps1 @@ -0,0 +1,67 @@ +function Push-CIPPDBCacheApplyBatch { + <# + .SYNOPSIS + Aggregate cache tasks from all tenants and start a flat execution orchestrator (Phase 2) + + .DESCRIPTION + PostExecution function for the DBCache pipeline. Receives aggregated results from the + per-tenant CIPPDBCacheData list activities, flattens them into a single batch, and starts + one orchestrator to execute all cache collection tasks across all tenants in parallel. + + .FUNCTIONALITY + Entrypoint + #> + param($Item) + + try { + # Aggregate all cache tasks from all tenant list activities + $AllTasks = [System.Collections.Generic.List[object]]::new() + + foreach ($TenantResult in $Item.Results) { + foreach ($Batch in $TenantResult) { + foreach ($Task in $Batch) { + if ($Task -and $Task.FunctionName) { + $AllTasks.Add($Task) + } + } + } + } + + if ($AllTasks.Count -eq 0) { + Write-Information 'No cache tasks to execute across all tenants' + return @{ Success = $true; TaskCount = 0 } + } + + Write-Information "Aggregated $($AllTasks.Count) cache tasks from all tenants" + + # Start a single flat orchestrator to execute all cache tasks + $InputObject = [PSCustomObject]@{ + OrchestratorName = 'CIPPDBCacheExecute' + Batch = @($AllTasks) + SkipLog = $true + } + + # Add test run post-execution if flagged + if ($Item.Parameters -and $Item.Parameters.TestRun -eq $true -and $Item.Parameters.TenantFilter) { + $InputObject | Add-Member -NotePropertyName PostExecution -NotePropertyValue @{ + FunctionName = 'CIPPDBTestsRun' + Parameters = @{ + TenantFilter = $Item.Parameters.TenantFilter + } + } + } + + $InstanceId = Start-NewOrchestration -FunctionName 'CIPPOrchestrator' -InputObject ($InputObject | ConvertTo-Json -Depth 10 -Compress) + Write-Information "Started flat cache execution orchestrator with ID = '$InstanceId' for $($AllTasks.Count) tasks" + + return @{ + Success = $true + TaskCount = $AllTasks.Count + InstanceId = $InstanceId + } + + } catch { + Write-Warning "Error in DBCache apply batch aggregation: $($_.Exception.Message)" + return @{ Success = $false; Error = $_.Exception.Message } + } +} diff --git a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-CIPPDBCacheData.ps1 b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-CIPPDBCacheData.ps1 index 8663bd09066e..6967e9f3d1c3 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-CIPPDBCacheData.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-CIPPDBCacheData.ps1 @@ -1,33 +1,33 @@ function Push-CIPPDBCacheData { <# .SYNOPSIS - Orchestrator function to collect and cache all data for a single tenant + List cache collection tasks for a single tenant (Phase 1 of fan-out/fan-in) .DESCRIPTION - Builds a dynamic batch of cache collection tasks based on tenant license capabilities + Checks tenant license capabilities and returns a list of cache collection work items. + Does NOT start sub-orchestrators. The returned items are aggregated by the PostExecution + function (CIPPDBCacheApplyBatch) and executed in a single flat orchestrator. .FUNCTIONALITY Entrypoint #> [CmdletBinding()] param($Item) - Write-Host "Starting cache collection orchestration for tenant: $($Item.TenantFilter) - Queue: $($Item.QueueName) (ID: $($Item.QueueId))" + Write-Host "Building cache task list for tenant: $($Item.TenantFilter)" $TenantFilter = $Item.TenantFilter $QueueId = $Item.QueueId try { - Write-LogMessage -API 'CIPPDBCache' -tenant $TenantFilter -message 'Starting database cache orchestration for tenant' -sev Info - # Check tenant capabilities for license-specific features $IntuneCapable = Test-CIPPStandardLicense -StandardName 'IntuneLicenseCheck' -TenantFilter $TenantFilter -RequiredCapabilities @('INTUNE_A', 'MDM_Services', 'EMS', 'SCCM', 'MICROSOFTINTUNEPLAN1') -SkipLog $ConditionalAccessCapable = Test-CIPPStandardLicense -StandardName 'ConditionalAccessLicenseCheck' -TenantFilter $TenantFilter -RequiredCapabilities @('AAD_PREMIUM', 'AAD_PREMIUM_P2') -SkipLog $AzureADPremiumP2Capable = Test-CIPPStandardLicense -StandardName 'AzureADPremiumP2LicenseCheck' -TenantFilter $TenantFilter -RequiredCapabilities @('AAD_PREMIUM_P2') -SkipLog $ExchangeCapable = Test-CIPPStandardLicense -StandardName 'ExchangeLicenseCheck' -TenantFilter $TenantFilter -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_S_STANDARD_GOV', 'EXCHANGE_S_ENTERPRISE_GOV', 'EXCHANGE_LITE') -SkipLog - Write-LogMessage -API 'CIPPDBCache' -tenant $TenantFilter -message "License capabilities - Intune: $IntuneCapable, Conditional Access: $ConditionalAccessCapable, Azure AD Premium P2: $AzureADPremiumP2Capable, Exchange: $ExchangeCapable" -sev Info + Write-Information "License capabilities for $TenantFilter - Intune: $IntuneCapable, CA: $ConditionalAccessCapable, P2: $AzureADPremiumP2Capable, Exchange: $ExchangeCapable" - # Build dynamic batch of cache collection tasks based on license capabilities - $Batch = [System.Collections.Generic.List[object]]::new() + # Build list of cache collection tasks based on license capabilities + $Tasks = [System.Collections.Generic.List[object]]::new() #region All Licenses - Basic tenant data collection $BasicCacheFunctions = @( @@ -60,7 +60,7 @@ function Push-CIPPDBCacheData { ) foreach ($CacheFunction in $BasicCacheFunctions) { - $Batch.Add(@{ + $Tasks.Add(@{ FunctionName = 'ExecCIPPDBCache' Name = $CacheFunction TenantFilter = $TenantFilter @@ -100,7 +100,7 @@ function Push-CIPPDBCacheData { ) foreach ($CacheFunction in $ExchangeCacheFunctions) { - $Batch.Add(@{ + $Tasks.Add(@{ FunctionName = 'ExecCIPPDBCache' Name = $CacheFunction TenantFilter = $TenantFilter @@ -108,7 +108,7 @@ function Push-CIPPDBCacheData { }) } } else { - Write-Host 'Skipping Exchange Online data collection - tenant does not have required license' + Write-Host "Skipping Exchange Online data collection for $TenantFilter - no required license" } #endregion Exchange Licensed @@ -121,7 +121,7 @@ function Push-CIPPDBCacheData { 'UserRegistrationDetails' ) foreach ($CacheFunction in $ConditionalAccessCacheFunctions) { - $Batch.Add(@{ + $Tasks.Add(@{ FunctionName = 'ExecCIPPDBCache' Name = $CacheFunction TenantFilter = $TenantFilter @@ -129,7 +129,7 @@ function Push-CIPPDBCacheData { }) } } else { - Write-Host 'Skipping Conditional Access data collection - tenant does not have required license' + Write-Host "Skipping Conditional Access data collection for $TenantFilter - no required license" } #endregion Conditional Access Licensed @@ -145,7 +145,7 @@ function Push-CIPPDBCacheData { 'RoleManagementPolicies' ) foreach ($CacheFunction in $P2CacheFunctions) { - $Batch.Add(@{ + $Tasks.Add(@{ FunctionName = 'ExecCIPPDBCache' Name = $CacheFunction TenantFilter = $TenantFilter @@ -153,7 +153,7 @@ function Push-CIPPDBCacheData { }) } } else { - Write-Host 'Skipping Azure AD Premium P2 Identity Protection data collection - tenant does not have required license' + Write-Host "Skipping Azure AD Premium P2 data collection for $TenantFilter - no required license" } #endregion Azure AD Premium P2 @@ -167,7 +167,7 @@ function Push-CIPPDBCacheData { 'DetectedApps' ) foreach ($CacheFunction in $IntuneCacheFunctions) { - $Batch.Add(@{ + $Tasks.Add(@{ FunctionName = 'ExecCIPPDBCache' Name = $CacheFunction TenantFilter = $TenantFilter @@ -175,41 +175,18 @@ function Push-CIPPDBCacheData { }) } } else { - Write-Host 'Skipping Intune data collection - tenant does not have required license' + Write-Host "Skipping Intune data collection for $TenantFilter - no required license" } #endregion Intune Licensed - Write-Information "Built batch of $($Batch.Count) cache collection activities for tenant $TenantFilter" - - # Start orchestration for this tenant's cache collection - $InputObject = [PSCustomObject]@{ - OrchestratorName = "CIPPDBCacheTenant_$TenantFilter" - Batch = @($Batch) - SkipLog = $true - } + Write-Information "Built $($Tasks.Count) cache tasks for tenant $TenantFilter" - if ($Item.TestRun -eq $true) { - $InputObject | Add-Member -NotePropertyName PostExecution -NotePropertyValue @{ - FunctionName = 'CIPPDBTestsRun' - Parameters = @{ - TenantFilter = $TenantFilter - } - } - } - - $InstanceId = Start-NewOrchestration -FunctionName 'CIPPOrchestrator' -InputObject ($InputObject | ConvertTo-Json -Depth 5 -Compress) - Write-Information "Started cache collection orchestration for $TenantFilter with ID = '$InstanceId'" - Write-LogMessage -API 'CIPPDBCache' -tenant $TenantFilter -message "Started cache collection orchestration with $($Batch.Count) activities. Instance ID: $InstanceId" -sev Info - - return @{ - InstanceId = $InstanceId - BatchCount = $Batch.Count - Message = "Cache collection orchestration started for $TenantFilter" - } + # Return the task list — the PostExecution function will aggregate and start a flat orchestrator + return @($Tasks) } catch { $ErrorMessage = Get-CippException -Exception $_ - Write-LogMessage -API 'CIPPDBCache' -tenant $TenantFilter -message "Failed to start cache collection orchestration: $($ErrorMessage.NormalizedError)" -sev Error -LogData $ErrorMessage - throw $ErrorMessage + Write-LogMessage -API 'CIPPDBCache' -tenant $TenantFilter -message "Failed to build cache task list: $($ErrorMessage.NormalizedError)" -sev Error -LogData $ErrorMessage + return @() } } diff --git a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecAppApprovalTemplate.ps1 b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecAppApprovalTemplate.ps1 index e6eec613a662..aa3e75d4b462 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecAppApprovalTemplate.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecAppApprovalTemplate.ps1 @@ -106,7 +106,7 @@ function Push-ExecAppApprovalTemplate { return $true } - $PropertiesToRemove = @('appId', 'id', 'createdDateTime', 'publisherDomain', 'servicePrincipalLockConfiguration', 'identifierUris', 'applicationIdUris') + $PropertiesToRemove = @('appId', 'id', 'createdDateTime', 'deletedDateTime', 'createdByAppId', 'publisherDomain', 'servicePrincipalLockConfiguration', 'identifierUris', 'applicationIdUris') # Strip tenant-specific data that might cause conflicts $CleanManifest = $ApplicationManifest | ConvertTo-Json -Depth 10 | ConvertFrom-Json diff --git a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecScheduledCommand.ps1 b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecScheduledCommand.ps1 index 53cf446760c4..951c48ccdc31 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecScheduledCommand.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecScheduledCommand.ps1 @@ -355,12 +355,22 @@ function Push-ExecScheduledCommand { if ($Item.Command -in $OrchestratorBasedCommands) { Write-Information "Command $($Item.Command) is orchestrator-based. Skipping task state update - will be handled by post-execution." if (!$IsMultiTenantExecution) { - # Update task state to 'Running' to indicate orchestration is in progress - Update-AzDataTableEntity -Force @Table -Entity @{ - PartitionKey = $task.PartitionKey - RowKey = $task.RowKey - Results = 'Orchestration in progress' - TaskState = 'Processing' + if ($State -eq 'Failed') { + # The orchestrator command itself failed to dispatch - record the failure so the task isn't lost + Update-AzDataTableEntity -Force @Table -Entity @{ + PartitionKey = $task.PartitionKey + RowKey = $task.RowKey + Results = "$results" + TaskState = 'Failed' + } + } else { + # Update task state to 'Processing' to indicate orchestration is in progress + Update-AzDataTableEntity -Force @Table -Entity @{ + PartitionKey = $task.PartitionKey + RowKey = $task.RowKey + Results = 'Orchestration in progress' + TaskState = 'Processing' + } } } } elseif ($IsMultiTenantExecution) { diff --git a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Invoke-CIPPDBTestsRun.ps1 b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Invoke-CIPPDBTestsRun.ps1 index e4ecb119bdcb..c5a646316e7f 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Invoke-CIPPDBTestsRun.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Invoke-CIPPDBTestsRun.ps1 @@ -45,8 +45,7 @@ function Invoke-CIPPDBTestsRun { return } - # Build batch of per-tenant list activities - # Each activity will start its own orchestrator for that tenant's tests + # Phase 1: Build per-tenant list activities (discover tests per tenant) $Batch = foreach ($Tenant in $AllTenantsList) { @{ FunctionName = 'CIPPTestsList' @@ -56,15 +55,17 @@ function Invoke-CIPPDBTestsRun { Write-Information "Built batch of $($Batch.Count) tenant test list activities" - # Start orchestrator to dispatch per-tenant test orchestrators + # Phase 2 via PostExecution: Aggregate all task lists and start flat execution orchestrator $InputObject = [PSCustomObject]@{ OrchestratorName = 'TestsList' Batch = @($Batch) SkipLog = $true + PostExecution = @{ + FunctionName = 'CIPPTestsApplyBatch' + } } - Write-Information "InputObject: $($InputObject | ConvertTo-Json -Depth 5 -Compress)" - $InstanceId = Start-NewOrchestration -FunctionName 'CIPPOrchestrator' -InputObject ($InputObject | ConvertTo-Json -Depth 5 -Compress) + $InstanceId = Start-CIPPOrchestrator -InputObject $InputObject Write-Information "Started tests list orchestration with ID = '$InstanceId'" return @{ diff --git a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Push-CIPPTestsApplyBatch.ps1 b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Push-CIPPTestsApplyBatch.ps1 new file mode 100644 index 000000000000..3f9abfa2b984 --- /dev/null +++ b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Push-CIPPTestsApplyBatch.ps1 @@ -0,0 +1,57 @@ +function Push-CIPPTestsApplyBatch { + <# + .SYNOPSIS + Aggregate test tasks from all tenants and start a flat execution orchestrator (Phase 2) + + .DESCRIPTION + PostExecution function for the Tests pipeline. Receives aggregated results from the + per-tenant CIPPTestsList activities, flattens them into a single batch, and starts + one orchestrator to execute all test tasks across all tenants in parallel. + + .FUNCTIONALITY + Entrypoint + #> + param($Item) + + try { + # Aggregate all test tasks from all tenant list activities + $AllTasks = [System.Collections.Generic.List[object]]::new() + + foreach ($TenantResult in $Item.Results) { + foreach ($Batch in $TenantResult) { + foreach ($Task in $Batch) { + if ($Task -and $Task.FunctionName) { + $AllTasks.Add($Task) + } + } + } + } + + if ($AllTasks.Count -eq 0) { + Write-Information 'No test tasks to execute across all tenants' + return @{ Success = $true; TaskCount = 0 } + } + + Write-Information "Aggregated $($AllTasks.Count) test tasks from all tenants" + + # Start a single flat orchestrator to execute all test tasks + $InputObject = [PSCustomObject]@{ + OrchestratorName = 'CIPPTestsExecute' + Batch = @($AllTasks) + SkipLog = $true + } + + $InstanceId = Start-NewOrchestration -FunctionName 'CIPPOrchestrator' -InputObject ($InputObject | ConvertTo-Json -Depth 10 -Compress) + Write-Information "Started flat tests execution orchestrator with ID = '$InstanceId' for $($AllTasks.Count) tasks" + + return @{ + Success = $true + TaskCount = $AllTasks.Count + InstanceId = $InstanceId + } + + } catch { + Write-Warning "Error in Tests apply batch aggregation: $($_.Exception.Message)" + return @{ Success = $false; Error = $_.Exception.Message } + } +} diff --git a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Push-CIPPTestsList.ps1 b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Push-CIPPTestsList.ps1 index dc5f57c87f4a..da7ada0978ef 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Push-CIPPTestsList.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Tests/Push-CIPPTestsList.ps1 @@ -1,7 +1,15 @@ function Push-CIPPTestsList { <# + .SYNOPSIS + Build the list of test activities for a single tenant (Phase 1) + + .DESCRIPTION + Checks whether the tenant has cached data and discovers all Invoke-CippTest* functions. + Returns the task array so the PostExecution aggregator can flatten all tenants into one + flat Phase 2 orchestrator. + .FUNCTIONALITY - Entrypoint + Entrypoint #> param($Item) @@ -27,8 +35,8 @@ function Push-CIPPTestsList { return @() } - # Build test batch for this tenant - $TestBatch = foreach ($Test in $AllTests) { + # Build test task list for this tenant — returned for PostExecution aggregation + $Tasks = foreach ($Test in $AllTests) { [PSCustomObject]@{ FunctionName = 'CIPPTest' TenantFilter = $TenantFilter @@ -36,32 +44,12 @@ function Push-CIPPTestsList { } } - Write-Information "Built $($TestBatch.Count) test activities for tenant $TenantFilter" - - # Start orchestrator for this tenant's tests - $InputObject = [PSCustomObject]@{ - OrchestratorName = "TestsRun_$TenantFilter" - Batch = @($TestBatch) - SkipLog = $true - } - - $InstanceId = Start-NewOrchestration -FunctionName 'CIPPOrchestrator' -InputObject ($InputObject | ConvertTo-Json -Depth 5 -Compress) - Write-Information "Started tests orchestrator for tenant $TenantFilter with ID = '$InstanceId'" - - return @{ - Success = $true - Tenant = $TenantFilter - InstanceId = $InstanceId - TestCount = $TestBatch.Count - } + Write-Information "Built $($Tasks.Count) test tasks for tenant $TenantFilter" + return @($Tasks) } catch { $ErrorMessage = Get-CippException -Exception $_ - Write-LogMessage -API 'Tests' -tenant $TenantFilter -message "Failed to start tests for tenant: $($ErrorMessage.NormalizedError)" -sev Error -LogData $ErrorMessage - return @{ - Success = $false - Tenant = $TenantFilter - Error = $ErrorMessage.NormalizedError - } + Write-LogMessage -API 'Tests' -tenant $TenantFilter -message "Failed to build test list: $($ErrorMessage.NormalizedError)" -sev Error -LogData $ErrorMessage + return @() } } diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecCippLogsSas.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecCippLogsSas.ps1 new file mode 100644 index 000000000000..074917e67c06 --- /dev/null +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecCippLogsSas.ps1 @@ -0,0 +1,65 @@ +function Invoke-ExecCippLogsSas { + <# + .SYNOPSIS + Generate a read-only SAS token for the CippLogs table + .DESCRIPTION + Creates a long-lived, read-only SAS URL for the CippLogs Azure Storage table. + .FUNCTIONALITY + Entrypoint + .ROLE + CIPP.AppSettings.ReadWrite + #> + [CmdletBinding()] + param($Request, $TriggerMetadata) + + $APIName = $Request.Params.CIPPEndpoint + Write-LogMessage -headers $Request.Headers -API $APIName -message 'Generating CippLogs readonly SAS token' -Sev Info + + try { + $conn = @{} + foreach ($part in ($env:AzureWebJobsStorage -split ';')) { + $p = $part.Trim() + if ($p -match '^(.+?)=(.+)$') { $conn[$matches[1]] = $matches[2] } + } + + $Days = [int]($Request.Body.Days ?? $Request.Query.Days ?? 365) + if ($Days -lt 1 -or $Days -gt 3650) { + throw 'Days must be between 1 and 3650' + } + + $Sas = New-CIPPAzServiceSAS ` + -AccountName $conn['AccountName'] ` + -AccountKey $conn['AccountKey'] ` + -Service 'table' ` + -ResourcePath 'CippLogs' ` + -Permissions 'r' ` + -ExpiryTime ([DateTime]::UtcNow.AddDays($Days)) + + $SASTable = Get-CIPPTable -TableName 'CippSASTokens' + $Entity = @{ + PartitionKey = 'SAS' + RowKey = 'CippLogs' + Permissions = 'r' + ExpiryTime = $Sas.ExpiryTime + } + Add-CIPPAzDataTableEntity @SASTable -Entity $Entity -Force + + $Body = @{ + Results = @{ + SASUrl = $Sas.ResourceUri + $Sas.Token + '&$format=application/json;odata=nometadata' + ExpiresOn = $Sas.Query['se'] + } + } + $StatusCode = [HttpStatusCode]::OK + } catch { + $ErrorMessage = Get-CippException -Exception $_ + Write-LogMessage -headers $Request.Headers -API $APIName -message "Failed to generate CippLogs readonly SAS token: $($ErrorMessage.NormalizedError)" -Sev Error -LogData $ErrorMessage + $Body = @{ Results = "Failed to generate readonly SAS token: $($ErrorMessage.NormalizedError)" } + $StatusCode = [HttpStatusCode]::InternalServerError + } + + return ([HttpResponseContext]@{ + StatusCode = $StatusCode + Body = $Body + }) +} diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Administration/Invoke-ListMailboxes.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Administration/Invoke-ListMailboxes.ps1 index 900fb02a9e33..d9f86a5ca50e 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Administration/Invoke-ListMailboxes.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Administration/Invoke-ListMailboxes.ps1 @@ -86,7 +86,7 @@ function Invoke-ListMailboxes { LitigationHoldEnabled, LitigationHoldDate, LitigationHoldDuration, - @{ Name = 'LicensedForLitigationHold'; Expression = { ($_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE') } }, + @{ Name = 'LicensedForLitigationHold'; Expression = { ($_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'BPOS_S_ArchiveAddOn' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE' -or $_.PersistedCapabilities -contains 'BPOS_S_DlpAddOn' -or $_.PersistedCapabilities -contains 'BPOS_S_Enterprise') } }, ComplianceTagHoldApplied, RetentionHoldEnabled, InPlaceHolds, diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-CIPPOffboardingJob.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-CIPPOffboardingJob.ps1 index 10f00534abae..a8b0a78c87fe 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-CIPPOffboardingJob.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-CIPPOffboardingJob.ps1 @@ -320,7 +320,7 @@ function Invoke-CIPPOffboardingJob { } } - $InstanceId = Start-CIPPOrchestrator -InputObject $InputObject + $InstanceId = Start-CIPPOrchestrator -InputObject $InputObject -CallerIsQueueTrigger Write-Information "Started offboarding job for $Username with ID = '$InstanceId'" Write-LogMessage -API $APIName -tenant $TenantFilter -message "Started offboarding job for $Username with $($Batch.Count) tasks. Instance ID: $InstanceId" -sev Info diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-ListUserMailboxDetails.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-ListUserMailboxDetails.ps1 index a0336ea3f1f9..0246f422dbd2 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-ListUserMailboxDetails.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-ListUserMailboxDetails.ps1 @@ -280,7 +280,7 @@ function Invoke-ListUserMailboxDetails { LitigationHoldEnabled, LitigationHoldDate, LitigationHoldDuration, - @{ Name = 'LicensedForLitigationHold'; Expression = { ($_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE') } }, + @{ Name = 'LicensedForLitigationHold'; Expression = { ($_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'BPOS_S_ArchiveAddOn' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE' -or $_.PersistedCapabilities -contains 'BPOS_S_DlpAddOn' -or $_.PersistedCapabilities -contains 'BPOS_S_Enterprise') } }, ComplianceTagHoldApplied, RetentionHoldEnabled, InPlaceHolds) diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ExecTestRun.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ExecTestRun.ps1 index a4a0892d0eb3..bd7fe721f34e 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ExecTestRun.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ExecTestRun.ps1 @@ -19,13 +19,19 @@ function Invoke-ExecTestRun { TenantFilter = $TenantFilter QueueId = $Queue.RowKey QueueName = "Cache - $TenantFilter" - TestRun = $true } ) $InputObject = [PSCustomObject]@{ OrchestratorName = 'TestDataCollectionAndRun' Batch = $Batch SkipLog = $false + PostExecution = @{ + FunctionName = 'CIPPDBCacheApplyBatch' + Parameters = @{ + TestRun = $true + TenantFilter = $TenantFilter + } + } } $InstanceId = Start-CIPPOrchestrator -InputObject $InputObject diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Administration/Application Approval/Invoke-ExecCreateAppTemplate.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Administration/Application Approval/Invoke-ExecCreateAppTemplate.ps1 index 520536881638..9d1c64a5552a 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Administration/Application Approval/Invoke-ExecCreateAppTemplate.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Administration/Application Approval/Invoke-ExecCreateAppTemplate.ps1 @@ -152,6 +152,7 @@ function Invoke-ExecCreateAppTemplate { 'id' 'createdDateTime' 'deletedDateTime' + 'createdByAppId' 'publisherDomain' 'servicePrincipalLockConfiguration' 'identifierUris' diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional/Invoke-ExecCAServiceExclusion.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional/Invoke-ExecCAServiceExclusion.ps1 index 8d1010e3362f..c8d1716bac27 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional/Invoke-ExecCAServiceExclusion.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional/Invoke-ExecCAServiceExclusion.ps1 @@ -21,7 +21,7 @@ function Invoke-ExecCAServiceExclusion { } catch { $ErrorMessage = Get-CippException -Exception $_ $Body = @{ Results = "Failed to add service provider exception to policy $($ID): $($ErrorMessage.NormalizedError)" } - Write-LogMessage -headers $Headers -API 'Set-CIPPCAPolicyServiceException' -message "Failed to update policy $($PolicyId) with service provider exception for tenant $($CSPtenantId): $($_.Exception.Message)" -Sev 'Error' -tenant $TenantFilter -LogData (Get-CippException -Exception $_) + Write-LogMessage -headers $Headers -API 'Set-CIPPCAPolicyServiceException' -message "Failed to update policy $($ID) with service provider exception for tenant $($env:TenantID): $($ErrorMessage.NormalizedError)" -Sev 'Error' -tenant $TenantFilter -LogData (Get-CippException -Exception $_) } return ([HttpResponseContext]@{ diff --git a/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPDBCacheOrchestrator.ps1 b/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPDBCacheOrchestrator.ps1 index 8717d60bdef9..e47bb80631c5 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPDBCacheOrchestrator.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPDBCacheOrchestrator.ps1 @@ -4,7 +4,9 @@ function Start-CIPPDBCacheOrchestrator { Orchestrates database cache collection across all tenants .DESCRIPTION - Creates per-tenant jobs to collect and cache Microsoft Graph data + Uses a two-phase fan-out/fan-in pattern (matching Standards): + Phase 1: Fan out CIPPDBCacheData activities per tenant to check licenses and build task lists + Phase 2: PostExecution aggregates all tasks and starts a single flat orchestrator to execute them .FUNCTIONALITY Entrypoint @@ -22,28 +24,31 @@ function Start-CIPPDBCacheOrchestrator { return } - $TaskCount = $TenantList.Count - - $Queue = New-CippQueueEntry -Name 'Database Cache Collection' -TotalTasks $TaskCount - $Batch = [system.collections.generic.list[object]]::new() - foreach ($Tenant in $TenantList) { - $Batch.Add([PSCustomObject]@{ - FunctionName = 'CIPPDBCacheData' - TenantFilter = $Tenant.defaultDomainName - QueueId = $Queue.RowKey - QueueName = "DB Cache - $($Tenant.defaultDomainName)" - }) + $Queue = New-CippQueueEntry -Name 'Database Cache Collection' -TotalTasks $TenantList.Count + + # Phase 1: Build per-tenant list activities (license check + task list generation) + $Batch = foreach ($Tenant in $TenantList) { + [PSCustomObject]@{ + FunctionName = 'CIPPDBCacheData' + TenantFilter = $Tenant.defaultDomainName + QueueId = $Queue.RowKey + QueueName = "DB Cache - $($Tenant.defaultDomainName)" + } } + Write-Host "Created queue $($Queue.RowKey) for database cache collection of $($TenantList.Count) tenants" - Write-Host "Starting batch of $($Batch.Count) cache collection activities" + + # Phase 2 via PostExecution: Aggregate all task lists and start flat execution orchestrator $InputObject = [PSCustomObject]@{ Batch = @($Batch) OrchestratorName = 'CIPPDBCacheOrchestrator' SkipLog = $false + PostExecution = @{ + FunctionName = 'CIPPDBCacheApplyBatch' + } } - Start-NewOrchestration -FunctionName 'CIPPOrchestrator' -InputObject ($InputObject | ConvertTo-Json -Compress -Depth 5) - + Start-CIPPOrchestrator -InputObject $InputObject Write-LogMessage -API 'CIPPDBCache' -message "Queued database cache collection for $($TenantList.Count) tenants" -sev Info } catch { diff --git a/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPOrchestrator.ps1 b/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPOrchestrator.ps1 index 53ecbe6247cb..8004fd0a6aed 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPOrchestrator.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPOrchestrator.ps1 @@ -67,8 +67,8 @@ function Start-CIPPOrchestrator { # Clean up the stored input object after starting the orchestration try { - $Entities = Get-AzDataTableEntity @OrchestratorTable -Filter "PartitionKey eq 'Input' and (RowKey eq '$InputObjectGuid' or OriginalEntityId eq '$InputObjectGuid')" -Property 'PartitionKey', 'RowKey', 'ETag' - Remove-AzDataTableEntity @OrchestratorTable -Entity $Entities + $Entities = Get-AzDataTableEntity @OrchestratorTable -Filter "PartitionKey eq 'Input' and (RowKey eq '$InputObjectGuid' or OriginalEntityId eq '$InputObjectGuid')" -Property PartitionKey, RowKey + Remove-AzDataTableEntity @OrchestratorTable -Entity $Entities -Force Write-Information "Cleaned up stored input object: $InputObjectGuid" } catch { Write-Warning "Failed to clean up stored input object $InputObjectGuid : $_" diff --git a/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-UserTasksOrchestrator.ps1 b/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-UserTasksOrchestrator.ps1 index 364b821f4dc1..ffd3152d6915 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-UserTasksOrchestrator.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-UserTasksOrchestrator.ps1 @@ -14,7 +14,7 @@ function Start-UserTasksOrchestrator { $24HoursAgo = (Get-Date).AddHours(-24).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ') # Pending = orchestrator queued, Running = actively executing # Pick up: Planned, Failed-Planned, stuck Pending (>24hr), or stuck Running (>4hr for large AllTenants tasks) - $Filter = "PartitionKey eq 'ScheduledTask' and (TaskState eq 'Planned' or TaskState eq 'Failed - Planned' or (TaskState eq 'Pending' and Timestamp lt datetime'$24HoursAgo') or (TaskState eq 'Running' and Timestamp lt datetime'$4HoursAgo'))" + $Filter = "PartitionKey eq 'ScheduledTask' and (TaskState eq 'Planned' or TaskState eq 'Failed - Planned' or (TaskState eq 'Pending' and Timestamp lt datetime'$24HoursAgo') or (TaskState eq 'Running' and Timestamp lt datetime'$4HoursAgo') or (TaskState eq 'Processing' and Timestamp lt datetime'$4HoursAgo'))" $tasks = Get-CIPPAzDataTableEntity @Table -Filter $Filter $Batch = [System.Collections.Generic.List[object]]::new() diff --git a/Modules/CIPPCore/Public/GraphHelper/Get-CIPPAzStorageQueueAnalysis.ps1 b/Modules/CIPPCore/Public/GraphHelper/Get-CIPPAzStorageQueueAnalysis.ps1 new file mode 100644 index 000000000000..7c9aa4e56735 --- /dev/null +++ b/Modules/CIPPCore/Public/GraphHelper/Get-CIPPAzStorageQueueAnalysis.ps1 @@ -0,0 +1,179 @@ +function Get-CIPPAzStorageQueueAnalysis { + <# + .SYNOPSIS + Analyses queue messages for DurableTask activity patterns. + .DESCRIPTION + Accepts queue messages from the pipeline or fetches them by queue name. + Detects DurableTask.AzureStorage.MessageData messages and parses the nested + Input JSON to produce a breakdown by tenant, task name, function name, and + orchestration instance. Non-DurableTask messages are counted but not parsed. + .PARAMETER InputObject + Queue message objects from Get-CIPPAzStorageQueueMessage. + .PARAMETER Name + Queue name to fetch messages from directly (uses Get-CIPPAzStorageQueueMessage). + .PARAMETER NumberOfMessages + Passed through to Get-CIPPAzStorageQueueMessage when -Name is used. + .PARAMETER ConnectionString + Azure Storage connection string. Defaults to $env:AzureWebJobsStorage + .PARAMETER RawTasks + If set, includes the full flat task list in the output. + .EXAMPLE + Get-CIPPAzStorageQueueAnalysis -Name 'cipp23l35proc-workitems' + .EXAMPLE + Get-CIPPAzStorageQueueMessage -Name 'cipp23l35proc-workitems' | Get-CIPPAzStorageQueueAnalysis + #> + [CmdletBinding(DefaultParameterSetName = 'ByName')] + param( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ParameterSetName = 'Pipeline')] + [object[]]$InputObject, + + [Parameter(Mandatory = $true, Position = 0, ParameterSetName = 'ByName')] + [string]$Name, + + [Parameter(Mandatory = $false, ParameterSetName = 'ByName')] + [int]$NumberOfMessages, + + [Parameter(Mandatory = $false, ParameterSetName = 'ByName')] + [string]$ConnectionString = $env:AzureWebJobsStorage, + + [Parameter(Mandatory = $false)] + [switch]$RawTasks + ) + + begin { + $allMessages = [System.Collections.Generic.List[object]]::new() + } + + process { + if ($PSCmdlet.ParameterSetName -eq 'Pipeline') { + foreach ($msg in $InputObject) { $allMessages.Add($msg) } + } + } + + end { + # Fetch messages if called by name + if ($PSCmdlet.ParameterSetName -eq 'ByName') { + $fetchParams = @{ Name = $Name; ConnectionString = $ConnectionString } + if ($PSBoundParameters.ContainsKey('NumberOfMessages')) { $fetchParams['NumberOfMessages'] = $NumberOfMessages } + $fetched = Get-CIPPAzStorageQueueMessage @fetchParams + foreach ($msg in @($fetched)) { $allMessages.Add($msg) } + } + + $durableMessages = 0 + $unknownMessages = 0 + $tasks = [System.Collections.Generic.List[object]]::new() + $byTenant = @{} + $byTaskName = @{} + $byFunctionName = @{} + $byOrchestration = @{} + $oldestTime = $null + $newestTime = $null + + foreach ($msg in $allMessages) { + # Track insertion time range + if ($msg.InsertionTime) { + try { + $t = [System.DateTimeOffset]::Parse($msg.InsertionTime) + if ($null -eq $oldestTime -or $t -lt $oldestTime) { $oldestTime = $t } + if ($null -eq $newestTime -or $t -gt $newestTime) { $newestTime = $t } + } catch { } + } + + $msgData = $msg.Message + $isDurable = $msgData -and + $msgData.PSObject.Properties['$type'] -and + $msgData.'$type' -like 'DurableTask.AzureStorage.MessageData*' + + if (-not $isDurable) { + $unknownMessages++ + continue + } + + $durableMessages++ + $event = $msgData.TaskMessage?.Event + $orchInst = $msgData.TaskMessage?.OrchestrationInstance + + # Parse the Input field (JSON string inside the message) + $inputTasks = @() + if ($event -and $event.Input) { + try { + if (Test-Json -Json $event.Input -ErrorAction SilentlyContinue) { + $inputTasks = @($event.Input | ConvertFrom-Json -Depth 10) + } + } catch { } + } + + foreach ($task in $inputTasks) { + $tenant = $task.TenantFilter + $taskName = $task.Name + $funcName = $task.FunctionName + $queueId = $task.QueueId + $orchId = $orchInst?.InstanceId + + # Aggregate counts + if ($tenant) { $byTenant[$tenant] = ($byTenant[$tenant] ?? 0) + 1 } + if ($taskName) { $byTaskName[$taskName] = ($byTaskName[$taskName] ?? 0) + 1 } + if ($funcName) { $byFunctionName[$funcName] = ($byFunctionName[$funcName] ?? 0) + 1 } + + # Per-orchestration breakdown + if ($orchId) { + if (-not $byOrchestration.ContainsKey($orchId)) { + $byOrchestration[$orchId] = [PSCustomObject]@{ + InstanceId = $orchId + ExecutionId = $orchInst?.ExecutionId + Tenants = [System.Collections.Generic.HashSet[string]]::new() + TaskCount = 0 + TaskNames = [System.Collections.Generic.List[string]]::new() + } + } + $byOrchestration[$orchId].TaskCount++ + if ($tenant) { [void]$byOrchestration[$orchId].Tenants.Add($tenant) } + if ($taskName) { $byOrchestration[$orchId].TaskNames.Add($taskName) } + } + + $tasks.Add([PSCustomObject]@{ + MessageId = $msg.MessageId + InsertionTime = $msg.InsertionTime + DequeueCount = $msg.DequeueCount + SequenceNumber = $msgData.SequenceNumber + Episode = $msgData.Episode + TenantFilter = $tenant + TaskName = $taskName + FunctionName = $funcName + QueueId = $queueId + OrchestrationInstanceId = $orchId + EventTimestamp = $event?.Timestamp + }) + } + } + + # Sort summary tables descending by count + $tenantSummary = $byTenant.GetEnumerator() | Sort-Object Value -Descending | ForEach-Object { [PSCustomObject]@{ Tenant = $_.Key; Count = $_.Value } } + $taskSummary = $byTaskName.GetEnumerator() | Sort-Object Value -Descending | ForEach-Object { [PSCustomObject]@{ TaskName = $_.Key; Count = $_.Value } } + $funcSummary = $byFunctionName.GetEnumerator() | Sort-Object Value -Descending | ForEach-Object { [PSCustomObject]@{ FunctionName = $_.Key; Count = $_.Value } } + $orchSummary = $byOrchestration.Values | Sort-Object TaskCount -Descending | ForEach-Object { + [PSCustomObject]@{ + InstanceId = $_.InstanceId + ExecutionId = $_.ExecutionId + Tenants = @($_.Tenants) + TaskCount = $_.TaskCount + } + } + + $result = [PSCustomObject]@{ + TotalMessages = $allMessages.Count + DurableTaskMessages = $durableMessages + OtherMessages = $unknownMessages + OldestMessage = if ($oldestTime) { $oldestTime.ToString('u') } else { $null } + NewestMessage = if ($newestTime) { $newestTime.ToString('u') } else { $null } + ByTenant = $tenantSummary + ByTaskName = $taskSummary + ByFunctionName = $funcSummary + ByOrchestration = $orchSummary + } + + if ($RawTasks) { $result | Add-Member -NotePropertyName Tasks -NotePropertyValue $tasks.ToArray() } + + $result + } +} diff --git a/Modules/CIPPCore/Public/GraphHelper/Get-CIPPAzStorageQueueMessage.ps1 b/Modules/CIPPCore/Public/GraphHelper/Get-CIPPAzStorageQueueMessage.ps1 new file mode 100644 index 000000000000..73d2ecf9d840 --- /dev/null +++ b/Modules/CIPPCore/Public/GraphHelper/Get-CIPPAzStorageQueueMessage.ps1 @@ -0,0 +1,85 @@ +function Get-CIPPAzStorageQueueMessage { + <# + .SYNOPSIS + Peeks at messages in an Azure Storage Queue without removing them. + .DESCRIPTION + Uses New-CIPPAzStorageRequest to call the Queue service Peek Messages REST API. + When NumberOfMessages is not specified, the approximate message count is read from + queue metadata and used as the peek count (capped at the API maximum of 32). + MessageText values are automatically base64-decoded. + .PARAMETER Name + The name of the queue to peek messages from. + .PARAMETER NumberOfMessages + Number of messages to peek (1-32). When omitted, the approximate message count + from queue metadata is used, capped at 32. + .PARAMETER ConnectionString + Azure Storage connection string. Defaults to $env:AzureWebJobsStorage + .PARAMETER NoAutoCount + If set, skips the metadata call and peeks up to 32 messages regardless of queue depth. + .EXAMPLE + Get-CIPPAzStorageQueueMessage -Name 'myqueue' + Peeks up to the approximate number of messages (capped at 32). + .EXAMPLE + Get-CIPPAzStorageQueueMessage -Name 'myqueue' -NumberOfMessages 10 + Peeks exactly 10 messages. + .EXAMPLE + Get-CIPPAzStorageQueueMessage -Name 'myqueue' -NoAutoCount + Peeks up to 32 messages without a prior metadata call. + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true, Position = 0)] + [string]$Name, + + [Parameter(Mandatory = $false)] + [ValidateRange(1, 32)] + [int]$NumberOfMessages, + + [Parameter(Mandatory = $false)] + [string]$ConnectionString = $env:AzureWebJobsStorage, + + [Parameter(Mandatory = $false)] + [switch]$NoAutoCount + ) + + process { + $count = 32 + + if ($PSBoundParameters.ContainsKey('NumberOfMessages')) { + $count = $NumberOfMessages + } elseif (-not $NoAutoCount) { + # Use approximate message count from metadata to avoid over-peeking + try { + $meta = New-CIPPAzStorageRequest -Service 'queue' -Component 'metadata' -Resource $Name -ConnectionString $ConnectionString -Method 'GET' + if ($meta -and $null -ne $meta.ApproximateMessagesCount) { + if ([int]$meta.ApproximateMessagesCount -eq 0) { + Write-Verbose "Queue '$Name' reports 0 approximate messages." + return @() + } + $count = [Math]::Min([int]$meta.ApproximateMessagesCount, 32) + Write-Verbose "Using approximate message count: $count" + } + } catch { + Write-Verbose "Could not retrieve queue metadata; defaulting to numofmessages=32. Error: $($_.Exception.Message)" + $count = 32 + } + } + + $response = New-CIPPAzStorageRequest -Service 'queue' -Resource "$Name/messages" -QueryParams @{ + peekonly = 'true' + numofmessages = $count + } -ConnectionString $ConnectionString -Method 'GET' + + if (-not $response) { return @() } + + # New-CIPPAzStorageRequest parses //QueueMessage nodes into PSObjects. + # If the queue was empty the response may be an XmlDocument or XmlNode (empty QueueMessagesList). + if ($response -is [System.Xml.XmlDocument] -or $response -is [System.Xml.XmlNode]) { + Write-Verbose "Queue '$Name' returned no messages." + return @() + } + + # Ensure array output even for a single message + @($response) + } +} diff --git a/Modules/CIPPCore/Public/GraphHelper/New-CIPPAzServiceSAS.ps1 b/Modules/CIPPCore/Public/GraphHelper/New-CIPPAzServiceSAS.ps1 index 9f7f35d1eacb..56240c0dba42 100644 --- a/Modules/CIPPCore/Public/GraphHelper/New-CIPPAzServiceSAS.ps1 +++ b/Modules/CIPPCore/Public/GraphHelper/New-CIPPAzServiceSAS.ps1 @@ -38,7 +38,7 @@ function New-CIPPAzServiceSAS { 'blob' { return "/blob/$AccountName/$decodedPath" } 'queue' { return "/queue/$AccountName/$decodedPath" } 'file' { return "/file/$AccountName/$decodedPath" } - 'table' { return "/table/$AccountName/$decodedPath" } + 'table' { return "/table/$AccountName/$($decodedPath.ToLowerInvariant())" } } } @@ -171,9 +171,9 @@ function New-CIPPAzServiceSAS { $q['sr'] = $SignedResource if ($SnapshotTime) { $q['sst'] = $SnapshotTime } } elseif ($Service -eq 'table') { + # Table SAS requires tn (table name) in the query string + $q['tn'] = $ResourcePath.TrimStart('/') # Table SAS may include ranges (spk/srk/epk/erk), omitted here unless future parameters are added - # Table also uses tn (table name) in query, but canonicalizedResource already includes table name - # We rely on canonicalizedResource and omit tn unless specified by callers via ResourcePath } elseif ($Service -eq 'queue') { # No sr for queue } @@ -262,7 +262,7 @@ function New-CIPPAzServiceSAS { $q['sig'] = $SignatureBase64 # Compose ordered query for readability (common fields first) - $orderedKeys = @('sp', 'st', 'se', 'sip', 'spr', 'sv', 'sr', 'si', 'snapshot', 'ses', 'sdd', 'rscc', 'rscd', 'rsce', 'rscl', 'rsct', 'sig') + $orderedKeys = @('sp', 'st', 'se', 'sip', 'spr', 'sv', 'sr', 'tn', 'si', 'snapshot', 'ses', 'sdd', 'rscc', 'rscd', 'rsce', 'rscl', 'rsct', 'sig') $parts = [System.Collections.Generic.List[string]]::new() foreach ($k in $orderedKeys) { if ($q.ContainsKey($k) -and -not [string]::IsNullOrEmpty($q[$k])) { diff --git a/Modules/CIPPCore/Public/GraphHelper/New-CIPPAzStorageRequest.ps1 b/Modules/CIPPCore/Public/GraphHelper/New-CIPPAzStorageRequest.ps1 index 96f2cd729593..e6cdc2d75d00 100644 --- a/Modules/CIPPCore/Public/GraphHelper/New-CIPPAzStorageRequest.ps1 +++ b/Modules/CIPPCore/Public/GraphHelper/New-CIPPAzStorageRequest.ps1 @@ -837,6 +837,24 @@ function New-CIPPAzStorageRequest { [PSCustomObject]@{ Name = $nameNode.InnerText; Metadata = $meta } } if ($queues.Count -gt 0) { return $queues } + + # Queue messages (peek or dequeue response) + $messages = foreach ($node in $xmlDoc.SelectNodes('//QueueMessage')) { + $msgText = $node.SelectSingleNode('MessageText')?.InnerText + $msgObject = $null + if ($msgText -and (Test-Json -Json $msgText -ErrorAction SilentlyContinue)) { + try { $msgObject = $msgText | ConvertFrom-Json -Depth 20 } catch { $msgObject = $null } + } + $dcNode = $node.SelectSingleNode('DequeueCount') + [PSCustomObject]@{ + MessageId = $node.SelectSingleNode('MessageId')?.InnerText + InsertionTime = $node.SelectSingleNode('InsertionTime')?.InnerText + ExpirationTime = $node.SelectSingleNode('ExpirationTime')?.InnerText + DequeueCount = if ($dcNode) { try { [int]$dcNode.InnerText } catch { $null } } else { $null } + Message = if ($null -ne $msgObject) { $msgObject } else { $msgText } + } + } + if ($messages.Count -gt 0) { return $messages } } } } catch { } diff --git a/Modules/CIPPCore/Public/GraphHelper/New-GraphPOSTRequest.ps1 b/Modules/CIPPCore/Public/GraphHelper/New-GraphPOSTRequest.ps1 index d637e0d7c6c8..d5ea1de93675 100644 --- a/Modules/CIPPCore/Public/GraphHelper/New-GraphPOSTRequest.ps1 +++ b/Modules/CIPPCore/Public/GraphHelper/New-GraphPOSTRequest.ps1 @@ -35,7 +35,7 @@ function New-GraphPOSTRequest { } if (!$headers['User-Agent']) { - $headers['User-Agent'] = "CIPP/$($global:CippVersion ?? '1.0')" + $headers['User-Agent'] = "CIPP/$($env:CippVersion ?? '1.0')" } if (!$contentType) { diff --git a/Modules/CIPPCore/Public/Set-CIPPCAPolicyServiceException.ps1 b/Modules/CIPPCore/Public/Set-CIPPCAPolicyServiceException.ps1 index 51ca8ee0289b..5c2d03cc5cce 100644 --- a/Modules/CIPPCore/Public/Set-CIPPCAPolicyServiceException.ps1 +++ b/Modules/CIPPCore/Public/Set-CIPPCAPolicyServiceException.ps1 @@ -5,7 +5,9 @@ function Set-CIPPCAPolicyServiceException { $PolicyId ) - $CSPtenantId = $env:TenantID + if ([string]::IsNullOrWhiteSpace($env:TenantID)) { + throw 'Environment variable TenantID is not set. Cannot configure service provider exception without the CSP tenant ID.' + } # Get the current policy $policy = New-GraphGETRequest -uri "https://graph.microsoft.com/beta/identity/conditionalAccess/policies/$($PolicyId)" -tenantid $TenantFilter -AsApp $true @@ -23,8 +25,9 @@ function Set-CIPPCAPolicyServiceException { # Check if externalTenants is properly configured if ($excludeConfig.externalTenants) { $externalTenants = $excludeConfig.externalTenants - $hasCorrectExternalTenants = ($externalTenants.membershipKind -eq 'enumerated' -and - $externalTenants.members -contains $CSPtenantId) + $hasCorrectExternalTenants = $externalTenants.membershipKind -eq 'all' -or + ($externalTenants.membershipKind -eq 'enumerated' -and + $externalTenants.members -contains $env:TenantID) # If already configured, exit without making changes if ($hasServiceProvider -and $hasCorrectExternalTenants) { @@ -43,17 +46,15 @@ function Set-CIPPCAPolicyServiceException { '@odata.type' = '#microsoft.graph.conditionalAccessEnumeratedExternalTenants' membershipKind = 'enumerated' members = @( - $CSPtenantId + $env:TenantID ) } } # Add data to cached policy $policy.conditions.users.excludeGuestsOrExternalUsers = $excludeServiceProviderData - } - - # If excludeGuestsOrExternalUsers already has content correct it to match $excludeServiceProviderData - if ($policy.conditions.users.excludeGuestsOrExternalUsers) { + } else { + # If excludeGuestsOrExternalUsers already has content correct it to match $excludeServiceProviderData # If guestOrExternalUserTypes doesn't include type serviceProvider add it if ($policy.conditions.users.excludeGuestsOrExternalUsers.guestOrExternalUserTypes -notmatch 'serviceProvider') { @@ -63,21 +64,29 @@ function Set-CIPPCAPolicyServiceException { # If guestOrExternalUserTypes includes type serviceProvider and membershipKind is not all tenants if ($policy.conditions.users.excludeGuestsOrExternalUsers.guestOrExternalUserTypes -match 'serviceProvider' -and $policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants.membershipKind -ne 'all') { - # If membershipKind is enumerated and members does not include our tenant add it - if ($policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants.membershipKind -eq 'enumerated' -and $policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants.members -notmatch $CSPtenantId) { - $policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants.members += $($CSPtenantId) + if (-not $policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants) { + # externalTenants is missing entirely — create the full structure + $policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants = [pscustomobject]@{ + '@odata.type' = '#microsoft.graph.conditionalAccessEnumeratedExternalTenants' + membershipKind = 'enumerated' + members = @($env:TenantID) + } + } elseif ($policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants.membershipKind -eq 'enumerated' -and $policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants.members -notcontains $env:TenantID) { + $policy.conditions.users.excludeGuestsOrExternalUsers.externalTenants.members += $($env:TenantID) } } } - $Json = $policy | Select-Object * -ExcludeProperty TemplateId, createdDateTime, modifiedDateTime | ConvertTo-Json -Depth 20 + $PatchBody = @{ + conditions = @{ + users = $policy.conditions.users + } + } | ConvertTo-Json -Depth 20 Write-Information 'Updated policy JSON:' - Write-Information $Json + Write-Information $PatchBody - # Patch policy with updated data. - # TemplateId,createdDateTime,modifiedDateTime can't be written back so exclude them using -ExcludeProperty if ($PSCmdlet.ShouldProcess($PolicyId, 'Update policy with service provider exception')) { - $patch = New-GraphPOSTRequest -uri "https://graph.microsoft.com/beta/identity/conditionalAccess/policies/$($policy.id)" -tenantid $TenantFilter -type PATCH -body ($policy | Select-Object * -ExcludeProperty TemplateId, createdDateTime, modifiedDateTime | ConvertTo-Json -Depth 20) -AsApp $true + $null = New-GraphPOSTRequest -uri "https://graph.microsoft.com/beta/identity/conditionalAccess/policies/$($policy.id)" -tenantid $TenantFilter -type PATCH -body $PatchBody -AsApp $true return "Successfully added service provider to policy $PolicyId" } } else { diff --git a/Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardAppDeploy.ps1 b/Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardAppDeploy.ps1 index 547dca85d033..1e8dea2095af 100644 --- a/Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardAppDeploy.ps1 +++ b/Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardAppDeploy.ps1 @@ -220,7 +220,7 @@ function Invoke-CIPPStandardAppDeploy { continue } - $PropertiesToRemove = @('appId', 'id', 'createdDateTime', 'publisherDomain', 'servicePrincipalLockConfiguration', 'identifierUris', 'applicationIdUris') + $PropertiesToRemove = @('appId', 'id', 'createdDateTime', 'deletedDateTime', 'createdByAppId', 'publisherDomain', 'servicePrincipalLockConfiguration', 'identifierUris', 'applicationIdUris') # Strip tenant-specific data that might cause conflicts $CleanManifest = $ApplicationManifest | ConvertTo-Json -Depth 10 | ConvertFrom-Json diff --git a/Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEnableLitigationHold.ps1 b/Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEnableLitigationHold.ps1 index 54a45b6c08c5..91c6f45fa806 100644 --- a/Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEnableLitigationHold.ps1 +++ b/Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEnableLitigationHold.ps1 @@ -39,7 +39,7 @@ function Invoke-CIPPStandardEnableLitigationHold { try { $MailboxesNoLitHold = New-ExoRequest -tenantid $Tenant -cmdlet 'Get-Mailbox' -cmdParams @{ Filter = 'LitigationHoldEnabled -eq "False"' } -Select 'UserPrincipalName,PersistedCapabilities,LitigationHoldEnabled' | - Where-Object { $_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE' -or $_.PersistedCapabilities -contains 'BPOS_S_DlpAddOn' -or $_.PersistedCapabilities -contains 'BPOS_S_Enterprise' } + Where-Object { $_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'BPOS_S_ArchiveAddOn' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE' -or $_.PersistedCapabilities -contains 'BPOS_S_DlpAddOn' -or $_.PersistedCapabilities -contains 'BPOS_S_Enterprise' } } catch { $ErrorMessage = Get-NormalizedError -Message $_.Exception.Message Write-LogMessage -API 'Standards' -Tenant $Tenant -Message "Could not get the EnableLitigationHold state for $Tenant. Error: $ErrorMessage" -Sev Error diff --git a/host.json b/host.json index 32862eb0e52d..7ad611f803ff 100644 --- a/host.json +++ b/host.json @@ -16,9 +16,9 @@ "distributedTracingEnabled": false, "version": "None" }, - "defaultVersion": "10.2.1", + "defaultVersion": "10.2.2", "versionMatchStrategy": "Strict", "versionFailureStrategy": "Fail" } } -} \ No newline at end of file +} diff --git a/profile.ps1 b/profile.ps1 index cf882819db24..9a911530b7c6 100644 --- a/profile.ps1 +++ b/profile.ps1 @@ -96,8 +96,7 @@ $SwVersion = [System.Diagnostics.Stopwatch]::StartNew() $CurrentVersion = (Get-Content -Path (Join-Path $PSScriptRoot 'version_latest.txt') -Raw).Trim() $Table = Get-CippTable -tablename 'Version' Write-Information "Function App: $($env:WEBSITE_SITE_NAME) | API Version: $CurrentVersion | PS Version: $($PSVersionTable.PSVersion)" -$global:CippVersion = $CurrentVersion -$ENV:CurrentVersion = $CurrentVersion +$env:CippVersion = $CurrentVersion $LastStartup = Get-CIPPAzDataTableEntity @Table -Filter "PartitionKey eq 'Version' and RowKey eq '$($env:WEBSITE_SITE_NAME)'" if (!$LastStartup -or $CurrentVersion -ne $LastStartup.Version) { diff --git a/version_latest.txt b/version_latest.txt index 85651cb5eaa6..68e8fcedcbea 100644 --- a/version_latest.txt +++ b/version_latest.txt @@ -1 +1 @@ -10.2.1 \ No newline at end of file +10.2.2