Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AADActivityBasedTimeoutPolicy hardcoded Displayname "displayName-value" #5125

Open
ssoabx opened this issue Oct 1, 2024 · 2 comments
Open

Comments

@ssoabx
Copy link
Contributor

ssoabx commented Oct 1, 2024

Description of the issue

Seems like the DisplayName got hardcoded for the AADActivityBasedTimeoutPolicy resource. It gets properly found
Policy with Id {34ea2a09-776d-456b-87de-3439c587c77d} and DisplayName {ActivityBasedTimeoutPolicy} was found.
but always reports the DisplayName as displayName-value as the current value.

[[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy] Current Values: 
DisplayName=displayName-value

https://github.com/microsoft/Microsoft365DSC/blob/0048d354b1d18907609361d7a296c178215ec06c/Modules/Microsoft365DSC/DSCResources/MSFT_AADActivityBasedTimeoutPolicy/MSFT_AADActivityBasedTimeoutPolicy.psm1

Microsoft 365 DSC Version

1.24.904.1

Which workloads are affected

Azure Active Directory (Entra ID)

The DSC configuration

AADActivityBasedTimeoutPolicy "AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy"
            {
                ApplicationId         = $ConfigurationData.NonNodeData.ApplicationId;
                AzurePortalTimeOut    = "01:00:00";
                CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
                DefaultTimeOut        = "01:00:00";
                DisplayName           = "ActivityBasedTimeoutPolicy";
                Ensure                = "Present";
                Id                    = "3575c4b1-58c7-4a27-8499-d1873d6d0451";
                TenantId              = $ConfigurationData.NonNodeData.TenantId;
            }

Verbose logs showing the problem

2024-09-30T19:10:53.4829221Z VERBOSE: [fv-az636-816]: LCM:  [ Start  Resource ]  
2024-09-30T19:10:53.4829652Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy]
2024-09-30T19:10:53.4830123Z VERBOSE: [fv-az636-816]: LCM:  [ Start  Test     ]  
2024-09-30T19:10:53.4830768Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy]
2024-09-30T19:10:53.5186038Z VERBOSE: [fv-az636-816]:                            
2024-09-30T19:10:53.5187747Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy] Testing configuration of the 
2024-09-30T19:10:53.5188685Z Azure AD Activity Based Timeout Policy with Id {3575c4b1-58c7-4a27-8499-d1873d6d0451} and DisplayName 
2024-09-30T19:10:53.5189175Z {ActivityBasedTimeoutPolicy}
2024-09-30T19:10:53.7991274Z VERBOSE: [fv-az636-816]:                            
2024-09-30T19:10:53.7992945Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy] An Azure AD Activity Based 
2024-09-30T19:10:53.7994040Z Timeout Policy with Id {34ea2a09-776d-456b-87de-3439c587c77d} and DisplayName {ActivityBasedTimeoutPolicy} was found.
2024-09-30T19:10:53.8871982Z VERBOSE: [fv-az636-816]:                            
2024-09-30T19:10:53.8879604Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy] Current Values: 
2024-09-30T19:10:53.8880254Z ApplicationId=***
2024-09-30T19:10:53.8880429Z 
2024-09-30T19:10:53.8880645Z ApplicationSecret=$null
2024-09-30T19:10:53.8880770Z 
2024-09-30T19:10:53.8881023Z AzurePortalTimeOut=01:00:00
2024-09-30T19:10:53.8881163Z 
2024-09-30T19:10:53.8881506Z CertificateThumbprint=***
2024-09-30T19:10:53.8881635Z 
2024-09-30T19:10:53.8881836Z Credential=$null
2024-09-30T19:10:53.8881956Z 
2024-09-30T19:10:53.8882172Z DefaultTimeOut=01:00:00
2024-09-30T19:10:53.8882304Z 
2024-09-30T19:10:53.8882611Z DisplayName=displayName-value
2024-09-30T19:10:53.8882772Z 
2024-09-30T19:10:53.8882974Z Ensure=Present
2024-09-30T19:10:53.8883108Z 
2024-09-30T19:10:53.8883404Z Id=34ea2a09-776d-456b-87de-3439c587c77d
2024-09-30T19:10:53.8883577Z 
2024-09-30T19:10:53.8883782Z Managedidentity=False
2024-09-30T19:10:53.8883904Z 
2024-09-30T19:10:53.8884107Z TenantId=***
2024-09-30T19:10:53.8884612Z VERBOSE: [fv-az636-816]:                            
2024-09-30T19:10:53.8885035Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy] Target Values: 
2024-09-30T19:10:53.8885529Z AzurePortalTimeOut=01:00:00
2024-09-30T19:10:53.8885689Z 
2024-09-30T19:10:53.8886053Z CertificateThumbprint=***
2024-09-30T19:10:53.8886200Z 
2024-09-30T19:10:53.8886420Z DefaultTimeOut=01:00:00
2024-09-30T19:10:53.8886552Z 
2024-09-30T19:10:53.8886775Z DisplayName=ActivityBasedTimeoutPolicy
2024-09-30T19:10:53.8886911Z 
2024-09-30T19:10:53.8887275Z Ensure=Present
2024-09-30T19:10:53.8887586Z 
2024-09-30T19:10:53.8887944Z Verbose=True
2024-09-30T19:10:54.2436296Z VERBOSE: [fv-az636-816]:                            
2024-09-30T19:10:54.2446478Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy] Test-TargetResource returned 
2024-09-30T19:10:54.2451415Z False
2024-09-30T19:10:54.2452449Z VERBOSE: [fv-az636-816]: LCM:  [ End    Test     ]  
2024-09-30T19:10:54.2452969Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy]  in 0.7660 seconds.
2024-09-30T19:10:54.2453637Z VERBOSE: [fv-az636-816]: LCM:  [ Start  Set      ]  
2024-09-30T19:10:54.2454121Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy]
2024-09-30T19:10:54.4915249Z VERBOSE: [fv-az636-816]:                            
2024-09-30T19:10:54.4916060Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy] An Azure AD Activity Based 
2024-09-30T19:10:54.4916915Z Timeout Policy with Id {34ea2a09-776d-456b-87de-3439c587c77d} and DisplayName {ActivityBasedTimeoutPolicy} was found.
2024-09-30T19:10:54.4999297Z VERBOSE: [fv-az636-816]:                            
2024-09-30T19:10:54.5001024Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy] Creating an Azure AD Activity
2024-09-30T19:10:54.5002140Z  Based Timeout Policy with DisplayName {ActivityBasedTimeoutPolicy}
2024-09-30T19:10:54.7104332Z VERBOSE: [fv-az636-816]: LCM:  [ End    Set      ]  
2024-09-30T19:10:54.7107487Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy]  in 0.4690 seconds.
2024-09-30T19:10:54.7113555Z VERBOSE: [fv-az636-816]: LCM:  [ End    Resource ]  
2024-09-30T19:10:54.7116051Z [[AADActivityBasedTimeoutPolicy]AADActivityBasedTimeoutPolicy-ActivityBasedTimeoutPolicy]

Environment Information + PowerShell Version

No response

@FabienTschanz
Copy link
Contributor

@ssoabx Quickly checked on my computer, and there it is working without any issues. Can you please once again run the following commands:

  • Export-m365DSCConfiguration -Components @("AADActivityBasedTimeoutPolicy") -Path "D:\testbed" -ApplicationId $clientId -TenantId $tenantIdName -CertificateThumbprint $certThumbprint -Verbose
  • D:\testbed\M365TenantConfig.ps1
  • Test-DscConfiguration -ComputerName localhost -Path D:\testbed\M365TenantConfig\ -Verbose

You might need to tweak the path to match where your file is saved. Did you recompile the configuration after the export? That's necessary for the updated configuration to take place, otherwise it will fall back to the last compiled version (which might contain the wrong value).

@ssoabx
Copy link
Contributor Author

ssoabx commented Oct 1, 2024

I'll have to check it out a bit later sorry. I just figured I'd report it for now. It applies fine, but it reports as a hardcoded value for the Displayname (check "displayName-value" in the M365dsc code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants