-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Dev' into AAD_AppSecretSupport
- Loading branch information
Showing
20 changed files
with
236 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -423,15 +423,15 @@ function Set-TargetResource | |
{ | ||
$value = $presentationValue.clone() | ||
$value = Rename-M365DSCCimInstanceParameter -Properties $value -KeyMapping $keyToRename | ||
$value.add('[email protected]', "https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')/presentations('$($presentationValue.presentationDefinitionId)')") | ||
$value.add('[email protected]', $Global:MSCloudLoginAssistant.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')/presentations('$($presentationValue.presentationDefinitionId)')") | ||
$value.remove('PresentationDefinitionId') | ||
$value.remove('PresentationDefinitionLabel') | ||
$value.remove('id') | ||
$complexPresentationValues += $value | ||
} | ||
} | ||
$complexDefinitionValue = @{ | ||
'[email protected]' = "https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')" | ||
'[email protected]' = $Global:MSCloudLoginAssistant.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')" | ||
enabled = $definitionValue.Enabled | ||
presentationValues = $complexPresentationValues | ||
} | ||
|
@@ -519,15 +519,15 @@ function Set-TargetResource | |
{ | ||
$value = $presentationValue.clone() | ||
$value = Rename-M365DSCCimInstanceParameter -Properties $value -KeyMapping $keyToRename | ||
$value.add('[email protected]', "https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')/presentations('$($presentationValue.presentationDefinitionId)')") | ||
$value.add('[email protected]', "$($Global:MSCloudLoginAssistant.MicrosoftGraph.ResourceUrl)beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')/presentations('$($presentationValue.presentationDefinitionId)')") | ||
$value.remove('PresentationDefinitionId') | ||
$value.remove('PresentationDefinitionLabel') | ||
$value.remove('id') | ||
$complexPresentationValues += $value | ||
} | ||
} | ||
$complexDefinitionValue = @{ | ||
'[email protected]' = "https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')" | ||
'[email protected]' = $Global:MSCloudLoginAssistant.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')" | ||
enabled = $definitionValue.Enabled | ||
presentationValues = $complexPresentationValues | ||
} | ||
|
@@ -553,7 +553,7 @@ function Set-TargetResource | |
$currentPresentationValue = $currentDefinitionValue.PresentationValues | Where-Object { $_.PresentationDefinitionId -eq $presentationValue.presentationDefinitionId } | ||
$value = $presentationValue.clone() | ||
$value = Rename-M365DSCCimInstanceParameter -Properties $value -KeyMapping $keyToRename | ||
$value.add('[email protected]', "https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')/presentations('$($presentationValue.presentationDefinitionId)')") | ||
$value.add('[email protected]', "$($Global:MSCloudLoginAssistant.MicrosoftGraph.ResourceUrl)beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')/presentations('$($presentationValue.presentationDefinitionId)')") | ||
$value.remove('PresentationDefinitionId') | ||
$value.remove('PresentationDefinitionLabel') | ||
$value.remove('id') | ||
|
@@ -563,7 +563,7 @@ function Set-TargetResource | |
} | ||
$complexDefinitionValue = @{ | ||
id = $currentDefinitionValue.Id | ||
'[email protected]' = "https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')" | ||
'[email protected]' = $Global:MSCloudLoginAssistant.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/groupPolicyDefinitions('$($definitionValue.Definition.Id)')" | ||
enabled = $definitionValue.Enabled | ||
presentationValues = $complexPresentationValues | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,7 +294,7 @@ function Get-TargetResource | |
AccessTokens = $AccessTokens | ||
#endregion | ||
} | ||
|
||
$assignmentsValues = Get-MgBetaDeviceManagementDeviceConfigurationAssignment -DeviceConfigurationId $Id | ||
$assignmentResult = @() | ||
if ($assignmentsValues.Count -gt 0) | ||
|
@@ -521,7 +521,7 @@ function Set-TargetResource | |
} | ||
|
||
#region resource generator code | ||
$CreateParameters.Add("[email protected]", "https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations('$RootCertificateId')") | ||
$CreateParameters.Add("[email protected]", "$($Global:MSCloudLoginAssistant.MicrosoftGraph.ResourceUrl)beta/deviceManagement/deviceConfigurations('$RootCertificateId')") | ||
$CreateParameters.Add("@odata.type", "#microsoft.graph.windows81SCEPCertificateProfile") | ||
$policy = New-MgBetaDeviceManagementDeviceConfiguration -BodyParameter $CreateParameters | ||
$assignmentsHash = ConvertTo-IntunePolicyAssignment -IncludeDeviceFilter:$true -Assignments $Assignments | ||
|
@@ -1030,10 +1030,10 @@ function Update-DeviceConfigurationPolicyRootCertificateId | |
[System.String] | ||
$RootCertificateId | ||
) | ||
|
||
$Uri = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/deviceConfigurations('$DeviceConfigurationPolicyId')/microsoft.graph.windows81SCEPCertificateProfile/rootCertificate/`$ref" | ||
$ref = @{ | ||
'@odata.id' = "https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations('$RootCertificateId')" | ||
'@odata.id' = $Global:MSCloudLoginAssistant.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/deviceConfigurations('$RootCertificateId')" | ||
} | ||
|
||
Invoke-MgGraphRequest -Method PUT -Uri $Uri -Body ($ref|ConvertTo-Json) -ErrorAction Stop | ||
|
Oops, something went wrong.