diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f612af00e..aab24d0e33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log for Microsoft365DSC +# UNRELEASED + +* O365OrgSettings + * Fixes and issue where a the wrong url was being used in some of the API + calls, resulting in null returns for some properties in the Get method. + # 1.23.913.2 * MISC diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_O365OrgSettings/MSFT_O365OrgSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_O365OrgSettings/MSFT_O365OrgSettings.psm1 index 7d51547c81..dcd2bfa9fc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_O365OrgSettings/MSFT_O365OrgSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_O365OrgSettings/MSFT_O365OrgSettings.psm1 @@ -1139,7 +1139,7 @@ function Get-M365DSCOrgSettingsInstallationOptions try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/microsoft365Apps/installationOptions' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/microsoft365Apps/installationOptions' $results = Invoke-MgGraphRequest -Method GET -Uri $url return $results } @@ -1167,7 +1167,7 @@ function Update-M365DSCOrgSettingsInstallationOptions try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/microsoft365Apps/installationOptions' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/microsoft365Apps/installationOptions' Invoke-MgGraphRequest -Method PATCH -Uri $url -Body $Options | Out-Null } catch @@ -1194,7 +1194,7 @@ function Get-M365DSCOrgSettingsForms try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/forms/settings' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/forms/settings' $results = Invoke-MgGraphRequest -Method GET -Uri $url -ErrorAction Stop return $results } @@ -1219,7 +1219,7 @@ function Update-M365DSCOrgSettingsForms try { Write-Verbose -Message "Updating Forms Settings" - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/forms/settings' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/forms/settings' Invoke-MgGraphRequest -Method PATCH -Uri $url -Body $Options | Out-Null } catch @@ -1241,7 +1241,7 @@ function Get-M365DSCOrgSettingsDynamicsCustomerVoice try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/dynamics/customerVoice' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/dynamics/customerVoice' $results = Invoke-MgGraphRequest -Method GET -Uri $url -ErrorAction Stop return $results } @@ -1265,7 +1265,7 @@ function Update-M365DSCOrgSettingsDynamicsCustomerVoice try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/dynamics/customerVoice' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/dynamics/customerVoice' Invoke-MgGraphRequest -Method PATCH -Uri $url -Body $Options | Out-Null } catch @@ -1287,7 +1287,7 @@ function Get-M365DSCOrgSettingsAppsAndServices try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/appsAndServices/settings' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/appsAndServices/settings' $results = Invoke-MgGraphRequest -Method GET -Uri $url -ErrorAction Stop return $results } @@ -1311,7 +1311,7 @@ function Update-M365DSCOrgSettingsAppsAndServices try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/appsAndServices/settings' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/appsAndServices/settings' Invoke-MgGraphRequest -Method PATCH -Uri $url -Body $Options | Out-Null } catch @@ -1332,7 +1332,7 @@ function Get-M365DSCOrgSettingsToDo try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/todo/settings' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/todo/settings' $results = Invoke-MgGraphRequest -Method GET -Uri $url -ErrorAction Stop return $results } @@ -1356,7 +1356,7 @@ function Update-M365DSCOrgSettingsToDo try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/todo/settings' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/todo/settings' Invoke-MgGraphRequest -Method PATCH -Uri $url -Body $Options | Out-Null } catch @@ -1379,7 +1379,7 @@ function Get-M365DSCOrgSettingsAdminCenterReport try { - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/reportSettings' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/reportSettings' $results = Invoke-MgGraphRequest -Method GET -Uri $url -ErrorAction Stop return $results } @@ -1400,9 +1400,9 @@ function Update-M365DSCOrgSettingsAdminCenterReport $DisplayConcealedNames ) $VerbosePreference = 'SilentlyContinue' - $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/admin/reportSettings' + $url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/admin/reportSettings' $body = @{ - "@odata.context" = $Global:MSCloudLoginConnectionProfile.MicrosoftGraoh.ResourceUrl + 'beta/$metadata#admin/reportSettings/$entity' + "@odata.context" = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + 'beta/$metadata#admin/reportSettings/$entity' displayConcealedNames = $DisplayConcealedNames } Invoke-MgGraphRequest -Method PATCH -Uri $url -Body $body | Out-Null