From 7fbec7b894802c02a98f5490572b1d432e9d6b65 Mon Sep 17 00:00:00 2001 From: Friedrich Weinmann Date: Wed, 13 Mar 2024 15:47:59 +0100 Subject: [PATCH] extended query logic --- MiniGraph/MiniGraph.psd1 | 2 +- MiniGraph/functions/Invoke-GraphRequest.ps1 | 4 ++++ changelog.md | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/MiniGraph/MiniGraph.psd1 b/MiniGraph/MiniGraph.psd1 index a6c3dc7..190b278 100644 --- a/MiniGraph/MiniGraph.psd1 +++ b/MiniGraph/MiniGraph.psd1 @@ -4,7 +4,7 @@ RootModule = 'MiniGraph.psm1' # Version number of this module. -ModuleVersion = '1.3.16' +ModuleVersion = '1.3.17' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/MiniGraph/functions/Invoke-GraphRequest.ps1 b/MiniGraph/functions/Invoke-GraphRequest.ps1 index 2900d99..b45248b 100644 --- a/MiniGraph/functions/Invoke-GraphRequest.ps1 +++ b/MiniGraph/functions/Invoke-GraphRequest.ps1 @@ -8,6 +8,7 @@ .PARAMETER Query The relative graph query with all conditions appended. + Uses the full query if the query starts with http:// or https://. .PARAMETER Method Which rest method to use. @@ -68,6 +69,9 @@ Method = $Method ContentType = $ContentType } + if ($Query -match '^http://|https://') { + $parameters.Query = $Query + } if ($Body) { if ($Body -is [string]) { $parameters.Body = $Body } else { $parameters.Body = $Body | ConvertTo-Json -Compress -Depth 99 } diff --git a/changelog.md b/changelog.md index 5feb871..8dba267 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 1.3.17 (2024-03-13) + ++ Upd: Invoke-GraphRequest - supports full http links as query + ## 1.3.16 (2024-03-05) + New: Get-GraphToken - retrieve the currently used token