Skip to content

Commit

Permalink
Merge pull request #4058 from ricmestre/fixgraphbaseurl
Browse files Browse the repository at this point in the history
M365DSCDRGUtil: Fix empty BaseUrl since MSCloudLoginAssistant removed Intune workload
  • Loading branch information
NikCharlebois authored Dec 19, 2023
2 parents 726b18b + 507ca63 commit 2a3a093
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
* IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled
* Added Assignments
FIXES [#2932](https://github.com/microsoft/Microsoft365DSC/issues/2932)
* M365DSCDRGUtil
* Fix empty BaseUrl since MSCloudLoginAssistant removed Intune workload
FIXES [#4057](https://github.com/microsoft/Microsoft365DSC/issues/4057)

# 1.23.1213.1

Expand Down
10 changes: 4 additions & 6 deletions Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,7 @@ function New-IntuneSettingCatalogPolicy

try
{
$BaseUrl = $Global:MSCloudLoginConnectionProfile.Intune.GraphBaseUrl
$Uri = '$($BaseUrl)/beta/deviceManagement/configurationPolicies'
$Uri = '/beta/deviceManagement/configurationPolicies'

$policy = @{
'name' = $Name
Expand Down Expand Up @@ -1083,8 +1082,7 @@ function Update-IntuneSettingCatalogPolicy

try
{
$BaseUrl = $Global:MSCloudLoginConnectionProfile.Intune.GraphBaseUrl
$Uri = "$($BaseUrl)/beta/deviceManagement/configurationPolicies/$DeviceConfigurationPolicyId"
$Uri = "/beta/deviceManagement/configurationPolicies/$DeviceConfigurationPolicyId"

$policy = @{
'name' = $Name
Expand Down Expand Up @@ -1284,11 +1282,11 @@ function Update-DeviceConfigurationPolicyAssignment
[System.String]
$APIVersion = 'beta'
)

try
{
$deviceManagementPolicyAssignments = @()
$BaseUrl = $Global:MSCloudLoginConnectionProfile.Intune.GraphBaseUrl
$Uri = "$($BaseUrl)/$APIVersion/$Repository/$DeviceConfigurationPolicyId/assign"
$Uri = "/$APIVersion/$Repository/$DeviceConfigurationPolicyId/assign"

foreach ($target in $targets)
{
Expand Down

0 comments on commit 2a3a093

Please sign in to comment.