File tree Expand file tree Collapse file tree 3 files changed +27
-11
lines changed
DSCResources/MSFT_AADServicePrincipal Expand file tree Collapse file tree 3 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 11# Change log for Microsoft365DSC
22
3- # Release 1.25.723.2
3+ # 1.25.730.1
4+
5+ * AADServicePrincipal
6+ * Fixed an issue when translating ` AppId ` to the corresponding ` DisplayName ` during test.
7+ FIXES [ #6382 ] ( https://github.com/microsoft/Microsoft365DSC/issues/6382 )
8+
9+ # 1.25.723.2
410
511* AADConditionalAccessPolicy
612 * Remove the ValidateSet from the ProtocolFlows property.
Original file line number Diff line number Diff line change @@ -959,6 +959,12 @@ function Test-TargetResource
959959 $AccessTokens
960960 )
961961
962+ $ConnectionMode = New-M365DSCConnection - Workload ' MicrosoftGraph' `
963+ - InboundParameters $PSBoundParameters
964+
965+ # Ensure the proper dependencies are installed in the current environment.
966+ Confirm-M365DSCDependencies
967+
962968 # region Telemetry
963969 $ResourceName = $MyInvocation.MyCommand.ModuleName.Replace (' MSFT_' , ' ' )
964970 $CommandName = $MyInvocation.MyCommand
@@ -982,8 +988,15 @@ function Test-TargetResource
982988 }
983989 else
984990 {
985- $spn = Get-MgServicePrincipal - Filter " AppId eq '$ ( $ValuesToCheck.AppId ) '"
986- $ValuesToCheck.AppId = $spn.DisplayName
991+ $spn = Get-MgServicePrincipal - Filter " AppId eq '$ ( $PSBoundParameters.AppId ) '"
992+ if ($null -eq $spn )
993+ {
994+ Write-Verbose - Message " Application or Service Principal with AppId '$ ( $PSBoundParameters.AppId ) ' not found. Leaving it as AppId."
995+ }
996+ else
997+ {
998+ $PSBoundParameters.AppId = $spn.DisplayName
999+ }
9871000 }
9881001 }
9891002
Original file line number Diff line number Diff line change 33#
44# Generated by: Microsoft Corporation
55#
6- # Generated on: 2025-07-25
6+ # Generated on: 2025-07-30
77
88@ {
99
1010 # Script module or binary module file associated with this manifest.
1111 # RootModule = ''
1212
1313 # Version number of this module.
14- ModuleVersion = ' 1.25.723.2 '
14+ ModuleVersion = ' 1.25.730.1 '
1515
1616 # Supported PSEditions
1717 # CompatiblePSEditions = @()
151151 IconUri = ' https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true'
152152
153153 # ReleaseNotes of this module
154- ReleaseNotes = ' * AADConditionalAccessPolicy
155- * Remove the ValidateSet from the ProtocolFlows property.
156- * AADCrossTenantAccessPolicyConfigurationDefault
157- * Fixed the return values from the Get-TargetResource method.
158- * AADUser
159- * Fixed an issue when fetching a property from an empty array.'
154+ ReleaseNotes = ' * AADServicePrincipal
155+ * Fixed an issue when translating `AppId` to the corresponding `DisplayName` during test.
156+ FIXES [#6382](https://github.com/microsoft/Microsoft365DSC/issues/6382)'
160157
161158 # Flag to indicate whether the module requires explicit user acceptance for install/update
162159 # RequireLicenseAcceptance = $false
You can’t perform that action at this time.
0 commit comments