We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When creating a new AADGroup, the following parameters are all required by Graph, but are not required by the Microsoft365DSC module:
See https://learn.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=http#request-body, verified with testing
(For mailEnabled - the others are also true though)
VERBOSE: [COMPUTERNAME]: [[AADGroup]GroupName] Performing the operation "New-MgGroup_CreateExpanded" on target "Call remote 'GroupsGroupCreateGroup' operation". A value is required for property 'mailEnabled' of resource 'Group'. + CategoryInfo : InvalidOperation: ({ body = Micros...oftGraphGroup }:) [], CimException + FullyQualifiedErrorId : Request_BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgGroup_CreateExpanded + PSComputerName : localhost
The module should be updated so that compilation fails if these are not supplied (make them Required)
Configuration Example { param ( [Parameter(Mandatory = $true)] [PSCredential] $credsGlobalAdmin ) Import-DscResource -ModuleName Microsoft365DSC node localhost { AADGroup 'TestGroup' { DisplayName = 'TestGroup' MailNickname = 'TestGroup' SecurityEnabled = $true Ensure = "Present" Credential = $credsGlobalAdmin } } }
OsName : Microsoft Windows 11 Enterprise OsOperatingSystemSKU : EnterpriseEdition OsArchitecture : 64-bit WindowsVersion : 2009 WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250 OsLanguage : en-GB OsMuiLanguages : {en-GB, en-US}
1.23.308.1
The text was updated successfully, but these errors were encountered:
FIXES microsoft#3072
e6150ee
Merge pull request #3077 from NikCharlebois/AADGroup-Mandatory-Parame…
cdc9db4
…ters FIXES #3072
Successfully merging a pull request may close this issue.
Details of the scenario you tried and the problem that is occurring
When creating a new AADGroup, the following parameters are all required by Graph, but are not required by the Microsoft365DSC module:
See https://learn.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=http#request-body, verified with testing
Verbose logs showing the problem
(For mailEnabled - the others are also true though)
VERBOSE: [COMPUTERNAME]: [[AADGroup]GroupName] Performing the operation "New-MgGroup_CreateExpanded" on target "Call
remote 'GroupsGroupCreateGroup' operation".
A value is required for property 'mailEnabled' of resource 'Group'.
+ CategoryInfo : InvalidOperation: ({ body = Micros...oftGraphGroup }:) [], CimException
+ FullyQualifiedErrorId : Request_BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgGroup_CreateExpanded
+ PSComputerName : localhost
Suggested solution to the issue
The module should be updated so that compilation fails if these are not supplied (make them Required)
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
OsName : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage : en-GB
OsMuiLanguages : {en-GB, en-US}
Version of the DSC module that was used ('dev' if using current dev branch)
1.23.308.1
The text was updated successfully, but these errors were encountered: