-
Notifications
You must be signed in to change notification settings - Fork 523
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
Start-DscConfiguration: Restore fails on AAD tenant ... MSFT_AADRoleSetting failed to execute Test-TargetResource functionality with error message: Could not determine authentication method CimException: The SendConfigurationApply function did not succeed. #3695
Comments
Could you share a bit of your configuration and which authentication parameters are set? Please make sure to run Start-DSCConfiguration within PS 5.1. |
Hello @andikrueger, Let me answer instead of @horgasz2023 because he is unavailable today, but we are working on this project together. 1, We tried with both PS7 and PS 5.1, the result is the same. 2, We use client secret (and app ID) for authentication, so we add application related API permissions to the Azure AD app. 3, We exported the default AAD config (newly created tenant) without applications, users, and groups.(exact scope bellow) export scope: Thanks in advance! |
Would you mind sharing a bit of your config with redacted auth parameters? |
Sure, but maybe I do not get the point. Export: Import: |
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId; |
For the AAD application that is being used by M365DS we do have these settings in the ps1 file: AADApplication "M365DSC" |
this is option 2 from the guide: A Service Principal by specifying parameters such as an Azure Active Directory (AD) Application ID, Tenant ID and a Secret or Certificate. |
It looks like that you are missing the TenantId parameters in your configuration.
|
so the node part is like follows: param ( Configuration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The error comes from the AADRoleSetting resource restore when it hits the Global Administrator role and the whole procedure fails afterwards. The other roles before this does work. [[AADRoleSetting]AADRoleSetting-Global Administrator] |
Sorry folks, we are getting a little confused here. You are talking about AADRoleSetting being the problem, but so far you've shared an AADApplication and a AADAuthenticationMethodPolicy snippet. Can you share either the whole redacted configuration or the AADAuthenticationMethodPolicy snippet that is causing the error. Thanks |
will try to reach out to you through the MS Premier Support as i cannot share on a public space the config file. |
If you are able to find a solution for this issue, kindly share the resolution here and proceed to close the matter. |
Description of the issue
InvalidOperation: PowerShell DSC resource MSFT_AADRoleSetting failed to execute Test-TargetResource functionality with error message: Could not determine authentication method
CimException: The SendConfigurationApply function did not succeed.
Restore fails on AAD tenant. PowerShell DSC resource MSFT_AADRoleSetting failed to execute Test-TargetResource functionality with error message: Could not determine authentication method
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost
First role where it starts failing:
[[AADRoleSetting]AADRoleSetting-Global Administrator] Testing configuration of Role Assignment: Global Administrator
VERBOSE: : [[AADRoleSetting]AADRoleSetting-Global Administrator] Getting configuration of Role: Global Administrator
VERBOSE: : LCM: [ End Test ] [[AADRoleSetting]AADRoleSetting-Global Administrator] in 0.6110 seconds.
Microsoft 365 DSC Version
1.23.906.1
Which workloads are affected
Azure Active Directory
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: