Skip to content

Commit

Permalink
Added check for GraphBaseUri
Browse files Browse the repository at this point in the history
  • Loading branch information
merill committed Mar 21, 2024
1 parent 42371b4 commit 87af90d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions powershell/Maester.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Set-StrictMode -Version 3.0

## Initialize Module Configuration
#Requires -Module Pester

## Initialize Module Variables
$MtGraphCache = @{}
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/Invoke-MtGraphRequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Function Invoke-MtGraphRequest {

begin {
if ([string]::IsNullOrEmpty($GraphBaseUri)) {
if ([string]::IsNullOrEmpty($global:GraphBaseUri)) {
if ((Test-Path variable:global:GraphBaseUri) -and ![string]::IsNullOrEmpty($global:GraphBaseUri)) {
$global:GraphBaseUri = $((Get-MgEnvironment -Name (Get-MgContext).Environment).GraphEndpoint)
}
$GraphBaseUri = $global:GraphBaseUri
Expand Down

0 comments on commit 87af90d

Please sign in to comment.