Skip to content

Commit

Permalink
Merge pull request #3688 from NikCharlebois/OrgSettings-fixes
Browse files Browse the repository at this point in the history
Fixes O365OrgSettings API calls
  • Loading branch information
NikCharlebois authored Sep 14, 2023
2 parents 221015a + 5aef146 commit 88c34ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand Down

0 comments on commit 88c34ef

Please sign in to comment.