Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

AADApplication: Get-DSCConfiguration not working

Open Wopienkaatwork opened this issue 11 months ago • 3 comments

Description of the issue

After applying a valid configuration I wanted to Get-DSCConfiguration but the command crashes with three eventlog entries. I have encluded a ZIP file with all the eventlog entries that happend during the call dsc-eventlogexport.zip The problem occurs while parsing an AADApplication.

Microsoft 365 DSC Version

1.24.313.1

Which workloads are affected

Azure Active Directory

The DSC configuration

No response

Verbose logs showing the problem

VERBOSE: [M365DSC-VM]:                            [[AADApplication]AADApplication-afterdeploy] Getting configuration of Azure AD Application
VERBOSE: [M365DSC-VM]:                            [[AADApplication]AADApplication-afterdeploy] An instance of Azure AD App was retrieved.
VERBOSE: [M365DSC-VM]:                            [[AADApplication]AADApplication-afterdeploy] Retrieving permissions for Azure AD Application {afterdeploy}
VERBOSE: [M365DSC-VM]:                            [[AADApplication]AADApplication-afterdeploy] Get-TargetResource Result:
 AppId=89ec29b7-dfea-4342-b929-801f75a17974
ApplicationId=***
ApplicationSecret=$null
AvailableToOtherTenants=False
CertificateThumbprint=***
Credential=$null
Description=$null
DisplayName=afterdeploy
Ensure=Present
GroupMembershipClaims=$null
Homepage=https://account.activedirectory.windowsazure.com:444/applications/default.aspx?metadata=customappsso|ISV9.1|primary|z
IdentifierUris=()
IsFallbackPublicClient=False
KnownClientApplications=()
LogoutURL=$null
Managedidentity=False
ObjectId=3177df0f-d102-4553-b453-d3a9e59cab11
Owners=()
Permissions=$null
PublicClient=False
ReplyURLs=()
TenantId=***
Get-DscConfiguration : GetConfiguration did not succeed.
At line:1 char:1
+ Get-DscConfiguration -verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get-DscConfiguration], CimException
    + FullyQualifiedErrorId : MI RESULT 1,Get-DscConfiguration

Environment Information + PowerShell Version

OsName               : Microsoft Windows Server 2022 Datacenter Azure Edition
OsOperatingSystemSKU : 407
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}



PS C:\latest>
PS C:\latest> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.20348.2227
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.20348.2227
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Wopienkaatwork avatar Mar 18 '24 15:03 Wopienkaatwork

Any chances you would have duplicate Applications with the same names in your environment?

NikCharlebois avatar Mar 18 '24 17:03 NikCharlebois

I already checked that because if two applications with the same name are found it will not be evaluated and warning is shown during the export

Wopienkaatwork avatar Mar 18 '24 17:03 Wopienkaatwork

I just doubled checked it, I have no applications with the same name in the environment.

Wopienkaatwork avatar Mar 22 '24 10:03 Wopienkaatwork