Skip to content

Commit 16f153c

Browse files
Merge pull request #6393 from microsoft/Dev
Release 1.25.730.1
2 parents 2e86d93 + 4669864 commit 16f153c

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
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.

Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff 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

Modules/Microsoft365DSC/Microsoft365DSC.psd1

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
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 = @()
@@ -151,12 +151,9 @@
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

0 commit comments

Comments
 (0)