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

Fixes #3344 #3675

Merged
merged 2 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* MISC
* Improved error logging for methods installing or updating modules.
FIXES [#3660](https://github.com/microsoft/Microsoft365DSC/issues/3660)
* Removed Id as a mandatory parameter for most AAD resources.
FIXES [#3344](https://github.com/microsoft/Microsoft365DSC/issues/3344)
* Single quotes handling in Export for complex CIMInstances
FIXES [#3479](https://github.com/microsoft/Microsoft365DSC/issues/3479)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -286,7 +286,7 @@ function Set-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -793,7 +793,7 @@ function Test-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class MSFT_MicrosoftGraphScopedRoleMembership
[ClassVersion("1.0.0.0"), FriendlyName("AADAdministrativeUnit")]
class MSFT_AADAdministrativeUnit : OMI_BaseResource
{
[Key, Description("Object-Id of the Administrative Unit")] String Id;
[Required, Description("DisplayName of the Administrative Unit")] String DisplayName;
[Key, Description("DisplayName of the Administrative Unit")] String DisplayName;
[Write, Description("Object-Id of the Administrative Unit")] String Id;
[Write, Description("Description of the Administrative Unit")] String Description;
[Write, Description("Visibility of the Administrative Unit. Specify HiddenMembership if members of the AU are hidden")] String Visibility;
[Write, Description("Specify membership type. Possible values are Assigned and Dynamic. Note that the functionality is currently in preview.")] String MembershipType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Get-TargetResource
[Microsoft.Management.Infrastructure.CimInstance]
$SystemCredentialPreferences,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,
#endregion
Expand Down Expand Up @@ -283,7 +283,7 @@ function Set-TargetResource
[Microsoft.Management.Infrastructure.CimInstance]
$SystemCredentialPreferences,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -405,12 +405,10 @@ function Test-TargetResource
[Microsoft.Management.Infrastructure.CimInstance]
$SystemCredentialPreferences,

[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

#endregion

[Parameter()]
[System.String]
[ValidateSet('Absent', 'Present')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ class MSFT_MicrosoftGraphSystemCredentialPreferences
class MSFT_AADAuthenticationMethodPolicy : OMI_BaseResource
{
[Write, Description("A description of the policy.")] String Description;
[Required, Description("The name of the policy.")] String DisplayName;
[Key, Description("The name of the policy.")] String DisplayName;
[Write, Description("The state of migration of the authentication methods policy from the legacy multifactor authentication and self-service password reset (SSPR) policies. The possible values are: premigration - means the authentication methods policy is used for authentication only, legacy policies are respected. migrationInProgress - means the authentication methods policy is used for both authenication and SSPR, legacy policies are respected. migrationComplete - means the authentication methods policy is used for authentication and SSPR, legacy policies are ignored. unknownFutureValue - Evolvable enumeration sentinel value. Do not use."), ValueMap{"preMigration","migrationInProgress","migrationComplete","unknownFutureValue"}, Values{"preMigration","migrationInProgress","migrationComplete","unknownFutureValue"}] String PolicyMigrationState;
[Write, Description("The version of the policy in use.")] String PolicyVersion;
[Write, Description("Days before the user will be asked to reconfirm their method.")] UInt32 ReconfirmationInDays;
[Write, Description("Enforce registration at sign-in time. This property can be used to remind users to set up targeted authentication methods."), EmbeddedInstance("MSFT_MicrosoftGraphregistrationEnforcement")] String RegistrationEnforcement;
[Write, Description("Prompt users with their most-preferred credential for multifactor authentication."), EmbeddedInstance("MSFT_MicrosoftGraphsystemCredentialPreferences")] String SystemCredentialPreferences;
[Key, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("The unique identifier for an entity. Read-only.")] String Id;
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -652,7 +652,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -1515,7 +1515,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[ClassVersion("1.0.0.0"), FriendlyName("AADConditionalAccessPolicy")]
class MSFT_AADConditionalAccessPolicy : OMI_BaseResource
{
[Key, Description("Specifies the GUID for the Policy.")] String Id;
[Required, Description("DisplayName of the AAD CA Policy")] String DisplayName;
[Key, Description("DisplayName of the AAD CA Policy")] String DisplayName;
[Write, Description("Specifies the GUID for the Policy.")] String Id;
[Write, Description("Specifies the State of the Policy."), ValueMap{"disabled","enabled","enabledForReportingButNotEnforced"}, Values{"disabled","enabled","enabledForReportingButNotEnforced"}] String State;
[Write, Description("Cloud Apps in scope of the Policy.")] String IncludeApplications[];
[Write, Description("Cloud Apps out of scope of the Policy.")] String ExcludeApplications[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -203,7 +203,7 @@ function Set-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -672,7 +672,7 @@ function Test-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class MSFT_AccessPackageResourceRoleScope
[ClassVersion("1.0.0.0"), FriendlyName("AADEntitlementManagementAccessPackage")]
class MSFT_AADEntitlementManagementAccessPackage : OMI_BaseResource
{
[Key, Description("The Id of the access package.")] String Id;
[Required, Description("The display name of the access package.")] String DisplayName;
[Key, Description("The display name of the access package.")] String DisplayName;
[Write, Description("The Id of the access package.")] String Id;
[Write, Description("Identifier of the access package catalog referencing this access package.")] String CatalogId;
[Write, Description("The description of the access package.")] String Description;
[Write, Description("Whether the access package is hidden from the requestor.")] Boolean IsHidden;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -322,7 +322,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -545,7 +545,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class MSFT_MicrosoftGraphcustomextensionendpointconfiguration
[ClassVersion("1.0.0.0"), FriendlyName("AADEntitlementManagementAccessPackageAssignmentPolicy")]
class MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy : OMI_BaseResource
{
[Key, Description("Id of the access package assignment policy.")] String Id;
[Required, Description("The display name of the policy.")] String DisplayName;
[Key, Description("The display name of the policy.")] String DisplayName;
[Write, Description("Id of the access package assignment policy.")] String Id;
[Write, Description("Identifier of the access package.")] String AccessPackageId;
[Write, Description("Who must review, and how often, the assignments to the access package from this policy. This property is null if reviews are not required."), EmbeddedInstance("MSFT_MicrosoftGraphassignmentreviewsettings")] String AccessReviewSettings;
[Write, Description("Indicates whether a user can extend the access package assignment duration after approval.")] Boolean CanExtend;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -149,7 +149,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -284,7 +284,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[ClassVersion("1.0.0.0"), FriendlyName("AADEntitlementManagementAccessPackageCatalog")]
class MSFT_AADEntitlementManagementAccessPackageCatalog : OMI_BaseResource
{
[Key, Description("The id of the access package catalog.")] String Id;
[Required, Description("The display name of the access package catalog.")] String DisplayName;
[Key, Description("The display name of the access package catalog.")] String DisplayName;
[Write, Description("The id of the access package catalog.")] String Id;
[Write, Description("Has the value Published if the access packages are available for management.")] String CatalogStatus;
[Write, Description("One of UserManaged or ServiceDefault."), ValueMap{"UserManaged","ServiceDefault"}, Values{"UserManaged","ServiceDefault"}] String CatalogType;
[Write, Description("The description of the access package catalog.")] String Description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -194,7 +194,7 @@ function Set-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -442,7 +442,7 @@ function Test-TargetResource
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class MSFT_MicrosoftGraphaccessPackageAnswerChoice
[ClassVersion("1.0.0.0"), FriendlyName("AADEntitlementManagementAccessPackageCatalogResource")]
class MSFT_AADEntitlementManagementAccessPackageCatalogResource : OMI_BaseResource
{
[Key, Description("Id of the access package catalog resource.")] String Id;
[Required, Description("The display name of the resource, such as the application name, group name or site name.")] String DisplayName;
[Key, Description("The display name of the resource, such as the application name, group name or site name.")] String DisplayName;
[Write, Description("Id of the access package catalog resource.")] String Id;
[Write, Description("The unique ID of the access package catalog.")] String CatalogId;
[Write, Description("The name of the user or application that first added this resource. Read-only.")] String AddedBy;
[Write, Description("The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.")] String AddedOn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -205,7 +205,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -431,7 +431,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class MSFT_AADEntitlementManagementConnectedOrganizationIdentitySource
[ClassVersion("1.0.0.0"), FriendlyName("AADEntitlementManagementConnectedOrganization")]
class MSFT_AADEntitlementManagementConnectedOrganization : OMI_BaseResource
{
[Key, Description("The Id of the Connected organization object.")] String Id;
[Required, Description("The display name of the connected organization.")] String DisplayName;
[Key, Description("The display name of the connected organization.")] String DisplayName;
[Write, Description("The Id of the Connected organization object.")] String Id;
[Write, Description("The description of the connected organization.")] String Description;
[Write, Description("The identity sources in this connected organization."), EmbeddedInstance("MSFT_AADEntitlementManagementConnectedOrganizationIdentitySource")] String IdentitySources[];
[Write, Description("The state of a connected organization defines whether assignment policies with requestor scope type AllConfiguredConnectedOrganizationSubjects are applicable or not."), ValueMap{"configured","proposed","unknownFutureValue"}, Values{"configured","proposed","unknownFutureValue"}] String State;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -393,7 +393,7 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down Expand Up @@ -1093,7 +1093,7 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.String]
$Id,

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[ClassVersion("1.0.0.0"), FriendlyName("AADRoleSetting")]
class MSFT_AADRoleSetting : OMI_BaseResource
{
[Key, Description("Specifies the RoleId.")] String Id;
[Required, Description("RuleDefinition Displayname")] String Displayname;
[Key, Description("RuleDefinition Displayname")] String Displayname;
[Write, Description("Specifies the RoleId.")] String Id;
[Write, Description("Activation maximum duration (hours).")] String ActivationMaxDuration;
[Write, Description("Require justification on activation (True/False)")] Boolean ActivationReqJustification;
[Write, Description("Require ticket information on activation (True/False)")] Boolean ActivationReqTicket;
Expand Down