You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to Release 1.24.1113.1, when I tried to run the DSC .ps1 to compile, all AADServicePrincipal blocks threw these types of errors:
Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.
At C:\Users\rick\Documents\files\My Documents\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12151 char:9
In the ConfigurationData.psd1 file I do have the Application ID in " quotes:
NonNodeData = @(
@{
# Tenant's default verified domain name
OrganizationName = "XXX.onmicrosoft.com"
# Azure AD Application Id for Authentication
ApplicationId = "d6289338-xxxxx"
# The Id or Name of the tenant to authenticate against
TenantId = "XXX.onmicrosoft.com"
# Azure AD Application Secret for Authentication
ApplicationSecret = "xxx"
}
)
I couldn't figure out how to fix it in this line in the .ps1:
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
So I ended up having to comment out ALL of the blocks in order to get the ps1 file to compile successfully.
Is there a fix or workaround for this?
Thanks,
Rick
Microsoft 365 DSC Version
1.24.1113.1
Which workloads are affected
Azure Active Directory (Entra ID)
The DSC configuration
Verbose logs showing the problem
PS C:\Users\rick\Documents\files\My Documents\scripts\Microsoft365DSC_More_AAD> cd "C:\Users\rick\Documents\files\My Documents\scripts\Microsoft365DSC_More_AAD\". .\M365TenantConfig_M365x648977_Backup.ps1
At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure
AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12131 char:9+ AADServicePrincipal "AADServicePrincipal-3eb2b82f-db5c-4631-a ...+ ~~~~~~~~~~~~~~~~~~~Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12151 char:9+ AADServicePrincipal "AADServicePrincipal-ead21ab2-6575-4c7c-8 ...
+ ~~~~~~~~~~~~~~~~~~~
Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.
At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure
AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12171 char:9+ AADServicePrincipal "AADServicePrincipal-6686d539-4dc9-4659-9 ...+ ~~~~~~~~~~~~~~~~~~~Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12200 char:9+ AADServicePrincipal "AADServicePrincipal-7182a742-e561-4c2b-a ...
+ ~~~~~~~~~~~~~~~~~~~
Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.
At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure
AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12220 char:9+ AADServicePrincipal "AADServicePrincipal-078dc035-d009-416a-8 ...+ ~~~~~~~~~~~~~~~~~~~Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12240 char:9+ AADServicePrincipal "AADServicePrincipal-6ce8fd29-38ff-46c9-a ...
+ ~~~~~~~~~~~~~~~~~~~
Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.
At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure
AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12260 char:9+ AADServicePrincipal "AADServicePrincipal-e9f6f7cc-5a1a-4582-8 ...+ ~~~~~~~~~~~~~~~~~~~Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12284 char:9+ AADServicePrincipal "AADServicePrincipal-d7e4770d-79eb-4f1e-9 ...
+ ~~~~~~~~~~~~~~~~~~~
Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.
At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure
AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12304 char:9+ AADServicePrincipal "AADServicePrincipal-ee23e8c1-1793-47f5-9 ...+ ~~~~~~~~~~~~~~~~~~~Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.At C:\Users\rick\Documents\files\My Documents\Security and Compliance\Azure AD\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12325 char:9+ AADServicePrincipal "AADServicePrincipal-4323bd8b-c682-44be-9 ...
+ ~~~~~~~~~~~~~~~~~~~
Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.
Not all parse errors were reported. Correct the reported errors and try again.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingValueForMandatoryProperty
Environment Information + PowerShell Version
OsName : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 26100.1.amd64fre.ge_release.240331-1435
OsLanguage : en-US
OsMuiLanguages : {en-US}
Key : PSVersion
Value : 5.1.26100.2161
Name : PSVersion
Key : PSEdition
Value : Desktop
Name : PSEdition
Key : PSCompatibleVersions
Value : {1.0,2.0,3.0,4.0...}
Name : PSCompatibleVersions
Key : BuildVersion
Value : 10.0.26100.2161
Name : BuildVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
The text was updated successfully, but these errors were encountered:
This resource has both AppId, which refers to the app associated with the Service Principal, and ApplicationId, which is normally pulled from your configdata file. The error you listed above refers to the former. Make sure AppId is provided as string.
But @NikCharlebois , in the errors listed in the verbose output, they are all pointing to lines that look like this line in the .ps1:
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
Those lines don't refer to AppId, only ApplicationId. Can you give me a bigger hint as to where I find where AppId is not properly typed as a string? And is this fixup a workaround? The code generates the .ps1 script not me so I didn't specifically type AppId anywhere I can think of.
Description of the issue
After upgrading to Release 1.24.1113.1, when I tried to run the DSC .ps1 to compile, all AADServicePrincipal blocks threw these types of errors:
Resource 'AADServicePrincipal' requires that a value of type 'String' be provided for property 'AppId'.
At C:\Users\rick\Documents\files\My Documents\scripts\Microsoft365DSC_More_AAD\M365TenantConfig_M365x648977_Backup.ps1:12151 char:9
In the ConfigurationData.psd1 file I do have the Application ID in " quotes:
NonNodeData = @(
@{
# Tenant's default verified domain name
OrganizationName = "XXX.onmicrosoft.com"
I couldn't figure out how to fix it in this line in the .ps1:
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
So I ended up having to comment out ALL of the blocks in order to get the ps1 file to compile successfully.
Is there a fix or workaround for this?
Thanks,
Rick
Microsoft 365 DSC Version
1.24.1113.1
Which workloads are affected
Azure Active Directory (Entra ID)
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: