diff --git a/src/Resources/Authorization.Autorest/docs/Az.Authorization.md b/src/Resources/Authorization.Autorest/docs/Az.Authorization.md index 7eef9be21736..72fad91f343e 100644 --- a/src/Resources/Authorization.Autorest/docs/Az.Authorization.md +++ b/src/Resources/Authorization.Autorest/docs/Az.Authorization.md @@ -1,6 +1,6 @@ --- Module Name: Az.Authorization -Module Guid: 7410e7c8-1228-4519-b21e-ede757f80297 +Module Guid: 9a7f9619-b38e-4642-a74d-2298096962a0 Download Help Link: https://docs.microsoft.com/powershell/module/az.authorization Help Version: 1.0.0.0 Locale: en-US diff --git a/src/Resources/Authorization.Autorest/generate-info.json b/src/Resources/Authorization.Autorest/generate-info.json index 10b2cece9c6c..88b45d784c6e 100644 --- a/src/Resources/Authorization.Autorest/generate-info.json +++ b/src/Resources/Authorization.Autorest/generate-info.json @@ -1,8 +1,8 @@ { "node": "v14.15.5", - "autorest_core": "3.8.4", - "autorest_modelerfour": "4.15.414", - "autorest_powershell": "3.0.492", + "autorest_powershell": "3.0.494", + "swagger_commit": "6b08774c89877269e73e11ac3ecbd1bd4e14f5a0", "autorest": "`-- (empty)", - "swagger_commit": "8c3029730778c35b597aa6d1afe69e78872bf03c" + "autorest_modelerfour": "4.15.414", + "autorest_core": "3.9.2" } diff --git a/src/Resources/Authorization.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/Resources/Authorization.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index a5e57e2ea2b4..3264ce9f6528 100644 --- a/src/Resources/Authorization.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/Resources/Authorization.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -163,7 +163,7 @@ protected override void ProcessRecord() if (previewVersion != null) { - sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'"); } sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule Authorization".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); diff --git a/src/Resources/MSGraph.Autorest/Az.MSGraph.format.ps1xml b/src/Resources/MSGraph.Autorest/Az.MSGraph.format.ps1xml index 223ba8cdd526..f46c6da251e5 100644 --- a/src/Resources/MSGraph.Autorest/Az.MSGraph.format.ps1xml +++ b/src/Resources/MSGraph.Autorest/Az.MSGraph.format.ps1xml @@ -897,6 +897,34 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgData + + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgData + + + + + + + + + + + + + + + CostCenter + + + Division + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEndpoint diff --git a/src/Resources/MSGraph.Autorest/custom/Get-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/custom/Get-AzADUser.ps1 index e23f3a22642e..887ab0cba1b5 100644 --- a/src/Resources/MSGraph.Autorest/custom/Get-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/custom/Get-AzADUser.ps1 @@ -68,6 +68,12 @@ function Get-AzADUser { [System.String[]] # Select properties to be returned ${Select}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Include count of items + ${Count}, [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='StartsWithParameterSet')] diff --git a/src/Resources/MSGraph.Autorest/custom/New-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/custom/New-AzADUser.ps1 index ad9d347fe7cd..a2e07da92f85 100644 --- a/src/Resources/MSGraph.Autorest/custom/New-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/custom/New-AzADUser.ps1 @@ -25,7 +25,7 @@ https://docs.microsoft.com/powershell/module/az.resources/new-azaduser #> function New-AzADUser { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser])] -[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='WithPassword', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] @@ -273,7 +273,7 @@ param( # The two may be specified together; for example: DisablePasswordExpiration, DisableStrongPassword.Supports $filter (ne, NOT). ${PasswordPolicy}, - [Parameter()] + [Parameter(ParameterSetName="WithPasswordProfile", Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile] # passwordProfile @@ -391,12 +391,12 @@ param( # Supports $filter (eq, ne, NOT, in,). ${UserType}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName="WithPassword", Mandatory)] [SecureString] # Password for the user. It must meet the tenant's password complexity requirements. It is recommended to set a strong password. ${Password}, - [Parameter()] + [Parameter(ParameterSetName="WithPassword")] [System.Management.Automation.SwitchParameter] # It must be specified if the user must change the password on the next successful login (true). Default behavior is (false) to not change the password on the next successful login. ${ForceChangePasswordNextLogin}, diff --git a/src/Resources/MSGraph.Autorest/docs/Get-AzADUser.md b/src/Resources/MSGraph.Autorest/docs/Get-AzADUser.md index 7a777e8401a9..d57660f73f69 100644 --- a/src/Resources/MSGraph.Autorest/docs/Get-AzADUser.md +++ b/src/Resources/MSGraph.Autorest/docs/Get-AzADUser.md @@ -14,9 +14,9 @@ Lists entities from users or get entity from users by key ### List (Default) ``` -Get-AzADUser [-AppendSelected] [-ConsistencyLevel ] [-DefaultProfile ] [-Expand ] - [-Filter ] [-First ] [-Orderby ] [-Search ] [-Select ] - [-Skip ] [] +Get-AzADUser [-Count] [-AppendSelected] [-ConsistencyLevel ] [-DefaultProfile ] + [-Expand ] [-Filter ] [-First ] [-Orderby ] [-Search ] + [-Select ] [-Skip ] [] ``` ### DisplayNameParameterSet @@ -114,6 +114,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Count +Include count of items + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with Azure. diff --git a/src/Resources/MSGraph.Autorest/docs/New-AzADUser.md b/src/Resources/MSGraph.Autorest/docs/New-AzADUser.md index e82afdc5074f..0a29780dc5f9 100644 --- a/src/Resources/MSGraph.Autorest/docs/New-AzADUser.md +++ b/src/Resources/MSGraph.Autorest/docs/New-AzADUser.md @@ -12,6 +12,7 @@ Adds new entity to users ## SYNTAX +### WithPassword (Default) ``` New-AzADUser -DisplayName -MailNickname -Password -UserPrincipalName [-AboutMe ] [-AccountEnabled ] [-AgeGroup ] [-Birthday ] [-City ] @@ -21,11 +22,26 @@ New-AzADUser -DisplayName -MailNickname -Password ] [-ForceChangePasswordNextLogin] [-GivenName ] [-HireDate ] [-ImmutableId ] [-Interest ] [-IsResourceAccount] [-JobTitle ] [-Mail ] [-MobilePhone ] [-MySite ] [-OfficeLocation ] [-OtherMail ] - [-PasswordPolicy ] [-PasswordProfile ] [-PostalCode ] - [-PreferredLanguage ] [-PreferredName ] [-Responsibility ] [-School ] - [-ShowInAddressList] [-Skill ] [-State ] [-StreetAddress ] [-Surname ] - [-UsageLocation ] [-UserType ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + [-PasswordPolicy ] [-PostalCode ] [-PreferredLanguage ] [-PreferredName ] + [-Responsibility ] [-School ] [-ShowInAddressList] [-Skill ] [-State ] + [-StreetAddress ] [-Surname ] [-UsageLocation ] [-UserType ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### WithPasswordProfile +``` +New-AzADUser -DisplayName -MailNickname -PasswordProfile + -UserPrincipalName [-AboutMe ] [-AccountEnabled ] [-AgeGroup ] + [-Birthday ] [-City ] [-CompanyName ] [-ConsentProvidedForMinor ] + [-Country ] [-DeletedDateTime ] [-Department ] [-DeviceEnrollmentLimit ] + [-EmployeeHireDate ] [-EmployeeId ] [-EmployeeType ] [-ExternalUserState ] + [-ExternalUserStateChangeDateTime ] [-FaxNumber ] [-GivenName ] + [-HireDate ] [-ImmutableId ] [-Interest ] [-IsResourceAccount] + [-JobTitle ] [-Mail ] [-MobilePhone ] [-MySite ] [-OfficeLocation ] + [-OtherMail ] [-PasswordPolicy ] [-PostalCode ] [-PreferredLanguage ] + [-PreferredName ] [-Responsibility ] [-School ] [-ShowInAddressList] + [-Skill ] [-State ] [-StreetAddress ] [-Surname ] [-UsageLocation ] + [-UserType ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -33,13 +49,23 @@ Adds new entity to users ## EXAMPLES -### Example 1: Create user +### Example 1: Create user with password profile ```powershell +$password = "xxxxxxxxxx" $pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password} New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn ``` -Create user +Create user with password profile + +### Example 2: Create user with password +```powershell +$password = "xxxxxxxxxx" +$password = ConvertTo-SecureString -AsPlainText -Force $password +New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn +``` + +Create user with password ## PARAMETERS @@ -363,7 +389,7 @@ Default behavior is (false) to not change the password on the next successful lo ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: WithPassword Aliases: Required: False @@ -585,7 +611,7 @@ It is recommended to set a strong password. ```yaml Type: System.Security.SecureString -Parameter Sets: (All) +Parameter Sets: WithPassword Aliases: Required: True @@ -619,10 +645,10 @@ To construct, see NOTES section for PASSWORDPROFILE properties and create a hash ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile -Parameter Sets: (All) +Parameter Sets: WithPasswordProfile Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False diff --git a/src/Resources/MSGraph.Autorest/docs/Remove-AzADUser.md b/src/Resources/MSGraph.Autorest/docs/Remove-AzADUser.md index 147933e37483..784591a17389 100644 --- a/src/Resources/MSGraph.Autorest/docs/Remove-AzADUser.md +++ b/src/Resources/MSGraph.Autorest/docs/Remove-AzADUser.md @@ -236,6 +236,10 @@ To create the parameters described below, construct a hash table containing the - `[DeviceVersion ]`: For internal use only. - `[EmployeeHireDate ]`: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in). - `[EmployeeId ]`: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). + - `[EmployeeOrgData ]`: employeeOrgData + - `[(Any) ]`: This indicates any property can be added to this object. + - `[CostCenter ]`: The cost center associated with the user. Returned only on $select. Supports $filter. + - `[Division ]`: The name of the division in which the user works. Returned only on $select. Supports $filter. - `[EmployeeType ]`: Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). - `[ExternalUserState ]`: For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Supports $filter (eq, ne, NOT , in). - `[ExternalUserStateChangeDateTime ]`: Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, NOT , in). @@ -249,6 +253,9 @@ To create the parameters described below, construct a hash table containing the - `[JobTitle ]`: The user's job title. Maximum length is 128 characters. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). - `[Mail ]`: The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith). - `[MailNickname ]`: The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). + - `[Manager ]`: Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + - `[DeletedDateTime ]`: + - `[DisplayName ]`: The name displayed in directory - `[OfficeLocation ]`: The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). - `[OnPremisesImmutableId ]`: This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in).. - `[OnPremisesLastSyncDateTime ]`: The last time at which the object was synced with the on-premises directory. 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. Supports $filter (eq, ne, not, ge, le, in). diff --git a/src/Resources/MSGraph.Autorest/docs/Update-AzADUser.md b/src/Resources/MSGraph.Autorest/docs/Update-AzADUser.md index 88cd3b3e3263..3f1ff5e18633 100644 --- a/src/Resources/MSGraph.Autorest/docs/Update-AzADUser.md +++ b/src/Resources/MSGraph.Autorest/docs/Update-AzADUser.md @@ -885,6 +885,10 @@ To create the parameters described below, construct a hash table containing the - `[DeviceVersion ]`: For internal use only. - `[EmployeeHireDate ]`: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in). - `[EmployeeId ]`: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). + - `[EmployeeOrgData ]`: employeeOrgData + - `[(Any) ]`: This indicates any property can be added to this object. + - `[CostCenter ]`: The cost center associated with the user. Returned only on $select. Supports $filter. + - `[Division ]`: The name of the division in which the user works. Returned only on $select. Supports $filter. - `[EmployeeType ]`: Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). - `[ExternalUserState ]`: For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Supports $filter (eq, ne, NOT , in). - `[ExternalUserStateChangeDateTime ]`: Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, NOT , in). @@ -898,6 +902,9 @@ To create the parameters described below, construct a hash table containing the - `[JobTitle ]`: The user's job title. Maximum length is 128 characters. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). - `[Mail ]`: The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith). - `[MailNickname ]`: The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). + - `[Manager ]`: Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + - `[DeletedDateTime ]`: + - `[DisplayName ]`: The name displayed in directory - `[OfficeLocation ]`: The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). - `[OnPremisesImmutableId ]`: This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in).. - `[OnPremisesLastSyncDateTime ]`: The last time at which the object was synced with the on-premises directory. 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. Supports $filter (eq, ne, not, ge, le, in). diff --git a/src/Resources/MSGraph.Autorest/examples/New-AzADUser.md b/src/Resources/MSGraph.Autorest/examples/New-AzADUser.md index 14506ffbb3ca..3f9de87a36ad 100644 --- a/src/Resources/MSGraph.Autorest/examples/New-AzADUser.md +++ b/src/Resources/MSGraph.Autorest/examples/New-AzADUser.md @@ -1,7 +1,17 @@ -### Example 1: Create user +### Example 1: Create user with password profile ```powershell +$password = "xxxxxxxxxx" $pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password} New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn ``` -Create user \ No newline at end of file +Create user with password profile + +### Example 2: Create user with password +```powershell +$password = "xxxxxxxxxx" +$password = ConvertTo-SecureString -AsPlainText -Force $password +New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn +``` + +Create user with password \ No newline at end of file diff --git a/src/Resources/MSGraph.Autorest/exports/Get-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/exports/Get-AzADUser.ps1 index e72685db4544..f46cfdfcbe92 100644 --- a/src/Resources/MSGraph.Autorest/exports/Get-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/Get-AzADUser.ps1 @@ -35,6 +35,12 @@ function Get-AzADUser { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Include count of items + ${Count}, + [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] diff --git a/src/Resources/MSGraph.Autorest/exports/New-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/exports/New-AzADUser.ps1 index 295de8b4dd62..0c3e840cc039 100644 --- a/src/Resources/MSGraph.Autorest/exports/New-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/New-AzADUser.ps1 @@ -20,8 +20,13 @@ Adds new entity to users .Description Adds new entity to users .Example +$password = "xxxxxxxxxx" $pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password} New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn +.Example +$password = "xxxxxxxxxx" +$password = ConvertTo-SecureString -AsPlainText -Force $password +New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn .Outputs Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser @@ -40,7 +45,7 @@ https://docs.microsoft.com/powershell/module/az.resources/new-azaduser #> function New-AzADUser { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser])] -[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='WithPassword', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] @@ -73,7 +78,7 @@ param( # Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith) and $orderBy. ${UserPrincipalName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='WithPassword', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Security.SecureString] # Password for the user. @@ -309,13 +314,6 @@ param( # The two may be specified together; for example: DisablePasswordExpiration, DisableStrongPassword.Supports $filter (ne, NOT). ${PasswordPolicy}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile] - # passwordProfile - # To construct, see NOTES section for PASSWORDPROFILE properties and create a hash table. - ${PasswordProfile}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] @@ -415,13 +413,20 @@ param( # Supports $filter (eq, ne, NOT, in,). ${UserType}, - [Parameter()] + [Parameter(ParameterSetName='WithPassword')] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Management.Automation.SwitchParameter] # It must be specified if the user must change the password on the next successful login (true). # Default behavior is (false) to not change the password on the next successful login. ${ForceChangePasswordNextLogin}, + [Parameter(ParameterSetName='WithPasswordProfile', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile] + # passwordProfile + # To construct, see NOTES section for PASSWORDPROFILE properties and create a hash table. + ${PasswordProfile}, + [Parameter()] [Alias('AzContext', 'AzureRmContext', 'AzureCredential')] [ValidateNotNull()] @@ -496,7 +501,8 @@ begin { } $mapping = @{ - __AllParameterSets = 'Az.MSGraph.custom\New-AzADUser'; + WithPassword = 'Az.MSGraph.custom\New-AzADUser'; + WithPasswordProfile = 'Az.MSGraph.custom\New-AzADUser'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1 index 20289d4fa5a4..af97346664b2 100644 --- a/src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -3426,6 +3426,12 @@ function Get-AzADUser { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Include count of items + ${Count}, + [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] @@ -6389,8 +6395,13 @@ Adds new entity to users .Description Adds new entity to users .Example +$password = "xxxxxxxxxx" $pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password} New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn +.Example +$password = "xxxxxxxxxx" +$password = ConvertTo-SecureString -AsPlainText -Force $password +New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn .Outputs Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser @@ -6409,7 +6420,7 @@ https://docs.microsoft.com/powershell/module/az.resources/new-azaduser #> function New-AzADUser { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser])] -[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='WithPassword', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] @@ -6442,7 +6453,7 @@ param( # Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith) and $orderBy. ${UserPrincipalName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='WithPassword', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Security.SecureString] # Password for the user. @@ -6678,13 +6689,6 @@ param( # The two may be specified together; for example: DisablePasswordExpiration, DisableStrongPassword.Supports $filter (ne, NOT). ${PasswordPolicy}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile] - # passwordProfile - # To construct, see NOTES section for PASSWORDPROFILE properties and create a hash table. - ${PasswordProfile}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] @@ -6784,13 +6788,20 @@ param( # Supports $filter (eq, ne, NOT, in,). ${UserType}, - [Parameter()] + [Parameter(ParameterSetName='WithPassword')] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Management.Automation.SwitchParameter] # It must be specified if the user must change the password on the next successful login (true). # Default behavior is (false) to not change the password on the next successful login. ${ForceChangePasswordNextLogin}, + [Parameter(ParameterSetName='WithPasswordProfile', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile] + # passwordProfile + # To construct, see NOTES section for PASSWORDPROFILE properties and create a hash table. + ${PasswordProfile}, + [Parameter()] [Alias('AzContext', 'AzureRmContext', 'AzureCredential')] [ValidateNotNull()] @@ -6865,7 +6876,8 @@ begin { } $mapping = @{ - __AllParameterSets = 'Az.MSGraph.custom\New-AzADUser'; + WithPassword = 'Az.MSGraph.custom\New-AzADUser'; + WithPasswordProfile = 'Az.MSGraph.custom\New-AzADUser'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -8995,6 +9007,10 @@ INPUTOBJECT : user input object [DeviceVersion ]: For internal use only. [EmployeeHireDate ]: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in). [EmployeeId ]: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). + [EmployeeOrgData ]: employeeOrgData + [(Any) ]: This indicates any property can be added to this object. + [CostCenter ]: The cost center associated with the user. Returned only on $select. Supports $filter. + [Division ]: The name of the division in which the user works. Returned only on $select. Supports $filter. [EmployeeType ]: Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). [ExternalUserState ]: For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Supports $filter (eq, ne, NOT , in). [ExternalUserStateChangeDateTime ]: Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, NOT , in). @@ -9008,6 +9024,9 @@ INPUTOBJECT : user input object [JobTitle ]: The user's job title. Maximum length is 128 characters. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). [Mail ]: The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith). [MailNickname ]: The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). + [Manager ]: Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + [DeletedDateTime ]: + [DisplayName ]: The name displayed in directory [OfficeLocation ]: The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). [OnPremisesImmutableId ]: This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in).. [OnPremisesLastSyncDateTime ]: The last time at which the object was synced with the on-premises directory. 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. Supports $filter (eq, ne, not, ge, le, in). @@ -10645,6 +10664,10 @@ INPUTOBJECT : user input object [DeviceVersion ]: For internal use only. [EmployeeHireDate ]: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in). [EmployeeId ]: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). + [EmployeeOrgData ]: employeeOrgData + [(Any) ]: This indicates any property can be added to this object. + [CostCenter ]: The cost center associated with the user. Returned only on $select. Supports $filter. + [Division ]: The name of the division in which the user works. Returned only on $select. Supports $filter. [EmployeeType ]: Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). [ExternalUserState ]: For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Supports $filter (eq, ne, NOT , in). [ExternalUserStateChangeDateTime ]: Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, NOT , in). @@ -10658,6 +10681,9 @@ INPUTOBJECT : user input object [JobTitle ]: The user's job title. Maximum length is 128 characters. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). [Mail ]: The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith). [MailNickname ]: The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). + [Manager ]: Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + [DeletedDateTime ]: + [DisplayName ]: The name displayed in directory [OfficeLocation ]: The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). [OnPremisesImmutableId ]: This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in).. [OnPremisesLastSyncDateTime ]: The last time at which the object was synced with the on-premises directory. 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. Supports $filter (eq, ne, not, ge, le, in). diff --git a/src/Resources/MSGraph.Autorest/exports/Remove-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/exports/Remove-AzADUser.ps1 index 93d1713892d7..368e343a2fcc 100644 --- a/src/Resources/MSGraph.Autorest/exports/Remove-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/Remove-AzADUser.ps1 @@ -49,6 +49,10 @@ INPUTOBJECT : user input object [DeviceVersion ]: For internal use only. [EmployeeHireDate ]: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in). [EmployeeId ]: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). + [EmployeeOrgData ]: employeeOrgData + [(Any) ]: This indicates any property can be added to this object. + [CostCenter ]: The cost center associated with the user. Returned only on $select. Supports $filter. + [Division ]: The name of the division in which the user works. Returned only on $select. Supports $filter. [EmployeeType ]: Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). [ExternalUserState ]: For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Supports $filter (eq, ne, NOT , in). [ExternalUserStateChangeDateTime ]: Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, NOT , in). @@ -62,6 +66,9 @@ INPUTOBJECT : user input object [JobTitle ]: The user's job title. Maximum length is 128 characters. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). [Mail ]: The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith). [MailNickname ]: The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). + [Manager ]: Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + [DeletedDateTime ]: + [DisplayName ]: The name displayed in directory [OfficeLocation ]: The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). [OnPremisesImmutableId ]: This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in).. [OnPremisesLastSyncDateTime ]: The last time at which the object was synced with the on-premises directory. 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. Supports $filter (eq, ne, not, ge, le, in). diff --git a/src/Resources/MSGraph.Autorest/exports/Update-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/exports/Update-AzADUser.ps1 index c4bca0abfd00..00e6279e6756 100644 --- a/src/Resources/MSGraph.Autorest/exports/Update-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/Update-AzADUser.ps1 @@ -52,6 +52,10 @@ INPUTOBJECT : user input object [DeviceVersion ]: For internal use only. [EmployeeHireDate ]: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in). [EmployeeId ]: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). + [EmployeeOrgData ]: employeeOrgData + [(Any) ]: This indicates any property can be added to this object. + [CostCenter ]: The cost center associated with the user. Returned only on $select. Supports $filter. + [Division ]: The name of the division in which the user works. Returned only on $select. Supports $filter. [EmployeeType ]: Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). [ExternalUserState ]: For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Supports $filter (eq, ne, NOT , in). [ExternalUserStateChangeDateTime ]: Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, NOT , in). @@ -65,6 +69,9 @@ INPUTOBJECT : user input object [JobTitle ]: The user's job title. Maximum length is 128 characters. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). [Mail ]: The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith). [MailNickname ]: The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). + [Manager ]: Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + [DeletedDateTime ]: + [DisplayName ]: The name displayed in directory [OfficeLocation ]: The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). [OnPremisesImmutableId ]: This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in).. [OnPremisesLastSyncDateTime ]: The last time at which the object was synced with the on-premises directory. 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. Supports $filter (eq, ne, not, ge, le, in). diff --git a/src/Resources/MSGraph.Autorest/generate-info.json b/src/Resources/MSGraph.Autorest/generate-info.json index 10b2cece9c6c..88b45d784c6e 100644 --- a/src/Resources/MSGraph.Autorest/generate-info.json +++ b/src/Resources/MSGraph.Autorest/generate-info.json @@ -1,8 +1,8 @@ { "node": "v14.15.5", - "autorest_core": "3.8.4", - "autorest_modelerfour": "4.15.414", - "autorest_powershell": "3.0.492", + "autorest_powershell": "3.0.494", + "swagger_commit": "6b08774c89877269e73e11ac3ecbd1bd4e14f5a0", "autorest": "`-- (empty)", - "swagger_commit": "8c3029730778c35b597aa6d1afe69e78872bf03c" + "autorest_modelerfour": "4.15.414", + "autorest_core": "3.9.2" } diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.PowerShell.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.PowerShell.cs new file mode 100644 index 000000000000..cf2875f268f9 --- /dev/null +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.PowerShell; + + /// employeeOrgData + [System.ComponentModel.TypeConverter(typeof(MicrosoftGraphEmployeeOrgDataTypeConverter))] + public partial class MicrosoftGraphEmployeeOrgData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MicrosoftGraphEmployeeOrgData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MicrosoftGraphEmployeeOrgData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MicrosoftGraphEmployeeOrgData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CostCenter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal)this).CostCenter = (string) content.GetValueForProperty("CostCenter",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal)this).CostCenter, global::System.Convert.ToString); + } + if (content.Contains("Division")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal)this).Division = (string) content.GetValueForProperty("Division",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal)this).Division, global::System.Convert.ToString); + } + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MicrosoftGraphEmployeeOrgData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CostCenter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal)this).CostCenter = (string) content.GetValueForProperty("CostCenter",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal)this).CostCenter, global::System.Convert.ToString); + } + if (content.Contains("Division")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal)this).Division = (string) content.GetValueForProperty("Division",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal)this).Division, global::System.Convert.ToString); + } + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// employeeOrgData + [System.ComponentModel.TypeConverter(typeof(MicrosoftGraphEmployeeOrgDataTypeConverter))] + public partial interface IMicrosoftGraphEmployeeOrgData + + { + + } +} \ No newline at end of file diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.TypeConverter.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.TypeConverter.cs new file mode 100644 index 000000000000..e3b66490449b --- /dev/null +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MicrosoftGraphEmployeeOrgDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MicrosoftGraphEmployeeOrgData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MicrosoftGraphEmployeeOrgData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MicrosoftGraphEmployeeOrgData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.cs new file mode 100644 index 000000000000..65083d09e741 --- /dev/null +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Extensions; + + /// employeeOrgData + public partial class MicrosoftGraphEmployeeOrgData : + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData, + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgDataInternal + { + + /// Backing field for property. + private string _costCenter; + + /// + /// The cost center associated with the user. Returned only on $select. Supports $filter. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Origin(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.PropertyOrigin.Owned)] + public string CostCenter { get => this._costCenter; set => this._costCenter = value; } + + /// Backing field for property. + private string _division; + + /// + /// The name of the division in which the user works. Returned only on $select. Supports $filter. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Origin(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.PropertyOrigin.Owned)] + public string Division { get => this._division; set => this._division = value; } + + /// Creates an new instance. + public MicrosoftGraphEmployeeOrgData() + { + + } + } + /// employeeOrgData + public partial interface IMicrosoftGraphEmployeeOrgData : + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IAssociativeArray + { + /// + /// The cost center associated with the user. Returned only on $select. Supports $filter. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The cost center associated with the user. Returned only on $select. Supports $filter.", + SerializedName = @"costCenter", + PossibleTypes = new [] { typeof(string) })] + string CostCenter { get; set; } + /// + /// The name of the division in which the user works. Returned only on $select. Supports $filter. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the division in which the user works. Returned only on $select. Supports $filter.", + SerializedName = @"division", + PossibleTypes = new [] { typeof(string) })] + string Division { get; set; } + + } + /// employeeOrgData + internal partial interface IMicrosoftGraphEmployeeOrgDataInternal + + { + /// + /// The cost center associated with the user. Returned only on $select. Supports $filter. + /// + string CostCenter { get; set; } + /// + /// The name of the division in which the user works. Returned only on $select. Supports $filter. + /// + string Division { get; set; } + + } +} \ No newline at end of file diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.dictionary.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.dictionary.cs new file mode 100644 index 000000000000..dee91dfb2313 --- /dev/null +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.dictionary.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Extensions; + + public partial class MicrosoftGraphEmployeeOrgData : + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + public global::System.Object this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, global::System.Object value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { "CostCenter","Division" } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { "CostCenter","Division" } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out global::System.Object value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgData source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.json.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.json.cs new file mode 100644 index 000000000000..aa9efd92a122 --- /dev/null +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Extensions; + + /// employeeOrgData + public partial class MicrosoftGraphEmployeeOrgData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject json ? new MicrosoftGraphEmployeeOrgData(json, new global::System.Collections.Generic.HashSet(){ @"costCenter",@"division" }) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject instance to deserialize from. + /// + internal MicrosoftGraphEmployeeOrgData(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IAssociativeArray)this).AdditionalProperties, Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.JsonSerializable.DeserializeDictionary(()=>new global::System.Collections.Generic.Dictionary()),exclusions ); + {_costCenter = If( json?.PropertyT("costCenter"), out var __jsonCostCenter) ? (string)__jsonCostCenter : (string)CostCenter;} + {_division = If( json?.PropertyT("division"), out var __jsonDivision) ? (string)__jsonDivision : (string)Division;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AddIf( null != (((object)this._costCenter)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._costCenter.ToString()) : null, "costCenter" ,container.Add ); + AddIf( null != (((object)this._division)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._division.ToString()) : null, "division" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.PowerShell.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.PowerShell.cs index 1c8cc1a0119d..2d5269fbf1b2 100644 --- a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.PowerShell.cs +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.PowerShell.cs @@ -169,6 +169,10 @@ internal MicrosoftGraphUser(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeId = (string) content.GetValueForProperty("EmployeeId",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeId, global::System.Convert.ToString); } + if (content.Contains("EmployeeOrgData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeOrgData = (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData) content.GetValueForProperty("EmployeeOrgData",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeOrgData, Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgDataTypeConverter.ConvertFrom); + } if (content.Contains("EmployeeType")) { ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeType = (string) content.GetValueForProperty("EmployeeType",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeType, global::System.Convert.ToString); @@ -213,6 +217,10 @@ internal MicrosoftGraphUser(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).LegalAgeGroupClassification = (string) content.GetValueForProperty("LegalAgeGroupClassification",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).LegalAgeGroupClassification, global::System.Convert.ToString); } + if (content.Contains("Manager")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).Manager = (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject) content.GetValueForProperty("Manager",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).Manager, Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphDirectoryObjectTypeConverter.ConvertFrom); + } if (content.Contains("Mail")) { ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).Mail = (string) content.GetValueForProperty("Mail",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).Mail, global::System.Convert.ToString); @@ -412,6 +420,10 @@ internal MicrosoftGraphUser(global::System.Management.Automation.PSObject conten { ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeId = (string) content.GetValueForProperty("EmployeeId",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeId, global::System.Convert.ToString); } + if (content.Contains("EmployeeOrgData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeOrgData = (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData) content.GetValueForProperty("EmployeeOrgData",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeOrgData, Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgDataTypeConverter.ConvertFrom); + } if (content.Contains("EmployeeType")) { ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeType = (string) content.GetValueForProperty("EmployeeType",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).EmployeeType, global::System.Convert.ToString); @@ -456,6 +468,10 @@ internal MicrosoftGraphUser(global::System.Management.Automation.PSObject conten { ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).LegalAgeGroupClassification = (string) content.GetValueForProperty("LegalAgeGroupClassification",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).LegalAgeGroupClassification, global::System.Convert.ToString); } + if (content.Contains("Manager")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).Manager = (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject) content.GetValueForProperty("Manager",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).Manager, Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphDirectoryObjectTypeConverter.ConvertFrom); + } if (content.Contains("Mail")) { ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).Mail = (string) content.GetValueForProperty("Mail",((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUserInternal)this).Mail, global::System.Convert.ToString); diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.cs index 1f1a6c752be3..409cd9140664 100644 --- a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.cs +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.cs @@ -192,6 +192,14 @@ public partial class MicrosoftGraphUser : [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.DoNotFormat] public string EmployeeId { get => this._employeeId; set => this._employeeId = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData _employeeOrgData; + + /// employeeOrgData + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Origin(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData EmployeeOrgData { get => (this._employeeOrgData = this._employeeOrgData ?? new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgData()); set => this._employeeOrgData = value; } + /// Backing field for property. private string _employeeType; @@ -342,6 +350,17 @@ public partial class MicrosoftGraphUser : [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.DoNotFormat] public string MailNickname { get => this._mailNickname; set => this._mailNickname = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject _manager; + + /// + /// Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity + /// types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Origin(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject Manager { get => (this._manager = this._manager ?? new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphDirectoryObject()); set => this._manager = value; } + /// Internal Acessors for OdataId string Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObjectInternal.OdataId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObjectInternal)__microsoftGraphDirectoryObject).OdataId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObjectInternal)__microsoftGraphDirectoryObject).OdataId = value; } @@ -838,6 +857,14 @@ public partial interface IMicrosoftGraphUser : SerializedName = @"employeeId", PossibleTypes = new [] { typeof(string) })] string EmployeeId { get; set; } + /// employeeOrgData + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"employeeOrgData", + SerializedName = @"employeeOrgData", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData) })] + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData EmployeeOrgData { get; set; } /// /// Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT /// , ge, le, in, startsWith). @@ -984,6 +1011,17 @@ public partial interface IMicrosoftGraphUser : PossibleTypes = new [] { typeof(string) })] string MailNickname { get; set; } /// + /// Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity + /// types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types.", + SerializedName = @"manager", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject) })] + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject Manager { get; set; } + /// /// The primary cellular telephone number for the user. Read-only for users synced from on-premises directory. Supports $filter /// (eq, ne, NOT, ge, le, in, startsWith). /// @@ -1325,6 +1363,8 @@ internal partial interface IMicrosoftGraphUserInternal : /// The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). /// string EmployeeId { get; set; } + /// employeeOrgData + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData EmployeeOrgData { get; set; } /// /// Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT /// , ge, le, in, startsWith). @@ -1393,6 +1433,11 @@ internal partial interface IMicrosoftGraphUserInternal : /// string MailNickname { get; set; } /// + /// Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity + /// types. + /// + Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject Manager { get; set; } + /// /// The primary cellular telephone number for the user. Read-only for users synced from on-premises directory. Supports $filter /// (eq, ne, NOT, ge, le, in, startsWith). /// diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.dictionary.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.dictionary.cs index 869beb60e2c7..61d29e54d7cd 100644 --- a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.dictionary.cs +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.dictionary.cs @@ -30,7 +30,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if (null != source) { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { "AccountEnabled","AgeGroup","ApproximateLastSignInDateTime","BusinessPhone","City","CompanyName","ConsentProvidedForMinor","Country","CreatedDateTime","CreationType","ComplianceExpirationDateTime","Department","DeviceVersion","EmployeeHireDate","EmployeeId","EmployeeType","ExternalUserState","ExternalUserStateChangeDateTime","FaxNumber","GivenName","Identity","ImAddress","IsResourceAccount","JobTitle","LastPasswordChangeDateTime","LegalAgeGroupClassification","Mail","MailNickname","MobilePhone","OfficeLocation","OtherMail","OnPremisesImmutableId","OnPremisesLastSyncDateTime","OnPremisesSyncEnabled","OperatingSystem","OperatingSystemVersion","PasswordPolicy","PasswordProfile","PostalCode","PreferredLanguage","ProxyAddress","PhysicalId","ShowInAddressList","SignInSessionsValidFromDateTime","State","StreetAddress","Surname","TrustType","UsageLocation","UserPrincipalName","UserType","Id","DeletedDateTime","DisplayName","OdataType","OdataId" } ) ) + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { "AccountEnabled","AgeGroup","ApproximateLastSignInDateTime","BusinessPhone","City","CompanyName","ConsentProvidedForMinor","Country","CreatedDateTime","CreationType","ComplianceExpirationDateTime","Department","DeviceVersion","EmployeeHireDate","EmployeeId","EmployeeOrgData","EmployeeType","ExternalUserState","ExternalUserStateChangeDateTime","FaxNumber","GivenName","Identity","ImAddress","IsResourceAccount","JobTitle","LastPasswordChangeDateTime","LegalAgeGroupClassification","Manager","Mail","MailNickname","MobilePhone","OfficeLocation","OtherMail","OnPremisesImmutableId","OnPremisesLastSyncDateTime","OnPremisesSyncEnabled","OperatingSystem","OperatingSystemVersion","PasswordPolicy","PasswordProfile","PostalCode","PreferredLanguage","ProxyAddress","PhysicalId","ShowInAddressList","SignInSessionsValidFromDateTime","State","StreetAddress","Surname","TrustType","UsageLocation","UserPrincipalName","UserType","Id","DeletedDateTime","DisplayName","OdataType","OdataId" } ) ) { if ((null != property.Key && null != property.Value)) { @@ -45,7 +45,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if (null != source) { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { "AccountEnabled","AgeGroup","ApproximateLastSignInDateTime","BusinessPhone","City","CompanyName","ConsentProvidedForMinor","Country","CreatedDateTime","CreationType","ComplianceExpirationDateTime","Department","DeviceVersion","EmployeeHireDate","EmployeeId","EmployeeType","ExternalUserState","ExternalUserStateChangeDateTime","FaxNumber","GivenName","Identity","ImAddress","IsResourceAccount","JobTitle","LastPasswordChangeDateTime","LegalAgeGroupClassification","Mail","MailNickname","MobilePhone","OfficeLocation","OtherMail","OnPremisesImmutableId","OnPremisesLastSyncDateTime","OnPremisesSyncEnabled","OperatingSystem","OperatingSystemVersion","PasswordPolicy","PasswordProfile","PostalCode","PreferredLanguage","ProxyAddress","PhysicalId","ShowInAddressList","SignInSessionsValidFromDateTime","State","StreetAddress","Surname","TrustType","UsageLocation","UserPrincipalName","UserType","Id","DeletedDateTime","DisplayName","OdataType","OdataId" } ) ) + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { "AccountEnabled","AgeGroup","ApproximateLastSignInDateTime","BusinessPhone","City","CompanyName","ConsentProvidedForMinor","Country","CreatedDateTime","CreationType","ComplianceExpirationDateTime","Department","DeviceVersion","EmployeeHireDate","EmployeeId","EmployeeOrgData","EmployeeType","ExternalUserState","ExternalUserStateChangeDateTime","FaxNumber","GivenName","Identity","ImAddress","IsResourceAccount","JobTitle","LastPasswordChangeDateTime","LegalAgeGroupClassification","Manager","Mail","MailNickname","MobilePhone","OfficeLocation","OtherMail","OnPremisesImmutableId","OnPremisesLastSyncDateTime","OnPremisesSyncEnabled","OperatingSystem","OperatingSystemVersion","PasswordPolicy","PasswordProfile","PostalCode","PreferredLanguage","ProxyAddress","PhysicalId","ShowInAddressList","SignInSessionsValidFromDateTime","State","StreetAddress","Surname","TrustType","UsageLocation","UserPrincipalName","UserType","Id","DeletedDateTime","DisplayName","OdataType","OdataId" } ) ) { if ((null != property.Key && null != property.Value)) { diff --git a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.json.cs b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.json.cs index 1a664997c454..209226d2c77f 100644 --- a/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.json.cs +++ b/src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphUser.json.cs @@ -62,7 +62,7 @@ public partial class MicrosoftGraphUser /// public static Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser FromJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject json ? new MicrosoftGraphUser(json, new global::System.Collections.Generic.HashSet(){ @"id",@"deletedDateTime",@"displayName",@"@odata.type",@"@odata.id",@"accountEnabled",@"ageGroup",@"approximateLastSignInDateTime",@"businessPhones",@"city",@"companyName",@"consentProvidedForMinor",@"country",@"createdDateTime",@"creationType",@"complianceExpirationDateTime",@"department",@"deviceVersion",@"employeeHireDate",@"employeeId",@"employeeType",@"externalUserState",@"externalUserStateChangeDateTime",@"faxNumber",@"givenName",@"identities",@"imAddresses",@"isResourceAccount",@"jobTitle",@"lastPasswordChangeDateTime",@"legalAgeGroupClassification",@"mail",@"mailNickname",@"mobilePhone",@"officeLocation",@"otherMails",@"onPremisesImmutableId",@"onPremisesLastSyncDateTime",@"onPremisesSyncEnabled",@"operatingSystem",@"operatingSystemVersion",@"passwordPolicies",@"passwordProfile",@"postalCode",@"preferredLanguage",@"proxyAddresses",@"physicalIds",@"showInAddressList",@"signInSessionsValidFromDateTime",@"state",@"streetAddress",@"surname",@"trustType",@"usageLocation",@"userPrincipalName",@"userType" }) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonObject json ? new MicrosoftGraphUser(json, new global::System.Collections.Generic.HashSet(){ @"id",@"deletedDateTime",@"displayName",@"@odata.type",@"@odata.id",@"accountEnabled",@"ageGroup",@"approximateLastSignInDateTime",@"businessPhones",@"city",@"companyName",@"consentProvidedForMinor",@"country",@"createdDateTime",@"creationType",@"complianceExpirationDateTime",@"department",@"deviceVersion",@"employeeHireDate",@"employeeId",@"employeeOrgData",@"employeeType",@"externalUserState",@"externalUserStateChangeDateTime",@"faxNumber",@"givenName",@"identities",@"imAddresses",@"isResourceAccount",@"jobTitle",@"lastPasswordChangeDateTime",@"legalAgeGroupClassification",@"manager",@"mail",@"mailNickname",@"mobilePhone",@"officeLocation",@"otherMails",@"onPremisesImmutableId",@"onPremisesLastSyncDateTime",@"onPremisesSyncEnabled",@"operatingSystem",@"operatingSystemVersion",@"passwordPolicies",@"passwordProfile",@"postalCode",@"preferredLanguage",@"proxyAddresses",@"physicalIds",@"showInAddressList",@"signInSessionsValidFromDateTime",@"state",@"streetAddress",@"surname",@"trustType",@"usageLocation",@"userPrincipalName",@"userType" }) : null; } /// @@ -95,6 +95,7 @@ internal MicrosoftGraphUser(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph {_deviceVersion = If( json?.PropertyT("deviceVersion"), out var __jsonDeviceVersion) ? (int?)__jsonDeviceVersion : DeviceVersion;} {_employeeHireDate = If( json?.PropertyT("employeeHireDate"), out var __jsonEmployeeHireDate) ? global::System.DateTime.TryParse((string)__jsonEmployeeHireDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEmployeeHireDateValue) ? __jsonEmployeeHireDateValue : EmployeeHireDate : EmployeeHireDate;} {_employeeId = If( json?.PropertyT("employeeId"), out var __jsonEmployeeId) ? (string)__jsonEmployeeId : (string)EmployeeId;} + {_employeeOrgData = If( json?.PropertyT("employeeOrgData"), out var __jsonEmployeeOrgData) ? Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgData.FromJson(__jsonEmployeeOrgData) : EmployeeOrgData;} {_employeeType = If( json?.PropertyT("employeeType"), out var __jsonEmployeeType) ? (string)__jsonEmployeeType : (string)EmployeeType;} {_externalUserState = If( json?.PropertyT("externalUserState"), out var __jsonExternalUserState) ? (string)__jsonExternalUserState : (string)ExternalUserState;} {_externalUserStateChangeDateTime = If( json?.PropertyT("externalUserStateChangeDateTime"), out var __jsonExternalUserStateChangeDateTime) ? global::System.DateTime.TryParse((string)__jsonExternalUserStateChangeDateTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExternalUserStateChangeDateTimeValue) ? __jsonExternalUserStateChangeDateTimeValue : ExternalUserStateChangeDateTime : ExternalUserStateChangeDateTime;} @@ -106,6 +107,7 @@ internal MicrosoftGraphUser(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph {_jobTitle = If( json?.PropertyT("jobTitle"), out var __jsonJobTitle) ? (string)__jsonJobTitle : (string)JobTitle;} {_lastPasswordChangeDateTime = If( json?.PropertyT("lastPasswordChangeDateTime"), out var __jsonLastPasswordChangeDateTime) ? global::System.DateTime.TryParse((string)__jsonLastPasswordChangeDateTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastPasswordChangeDateTimeValue) ? __jsonLastPasswordChangeDateTimeValue : LastPasswordChangeDateTime : LastPasswordChangeDateTime;} {_legalAgeGroupClassification = If( json?.PropertyT("legalAgeGroupClassification"), out var __jsonLegalAgeGroupClassification) ? (string)__jsonLegalAgeGroupClassification : (string)LegalAgeGroupClassification;} + {_manager = If( json?.PropertyT("manager"), out var __jsonManager) ? Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphDirectoryObject.FromJson(__jsonManager) : Manager;} {_mail = If( json?.PropertyT("mail"), out var __jsonMail) ? (string)__jsonMail : (string)Mail;} {_mailNickname = If( json?.PropertyT("mailNickname"), out var __jsonMailNickname) ? (string)__jsonMailNickname : (string)MailNickname;} {_mobilePhone = If( json?.PropertyT("mobilePhone"), out var __jsonMobilePhone) ? (string)__jsonMobilePhone : (string)MobilePhone;} @@ -187,6 +189,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNod AddIf( null != this._deviceVersion ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNumber((int)this._deviceVersion) : null, "deviceVersion" ,container.Add ); AddIf( null != this._employeeHireDate ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._employeeHireDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "employeeHireDate" ,container.Add ); AddIf( null != (((object)this._employeeId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._employeeId.ToString()) : null, "employeeId" ,container.Add ); + AddIf( null != this._employeeOrgData ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) this._employeeOrgData.ToJson(null,serializationMode) : null, "employeeOrgData" ,container.Add ); AddIf( null != (((object)this._employeeType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._employeeType.ToString()) : null, "employeeType" ,container.Add ); AddIf( null != (((object)this._externalUserState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._externalUserState.ToString()) : null, "externalUserState" ,container.Add ); AddIf( null != this._externalUserStateChangeDateTime ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._externalUserStateChangeDateTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "externalUserStateChangeDateTime" ,container.Add ); @@ -223,6 +226,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNod { AddIf( null != (((object)this._legalAgeGroupClassification)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._legalAgeGroupClassification.ToString()) : null, "legalAgeGroupClassification" ,container.Add ); } + AddIf( null != this._manager ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) this._manager.ToJson(null,serializationMode) : null, "manager" ,container.Add ); AddIf( null != (((object)this._mail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._mail.ToString()) : null, "mail" ,container.Add ); AddIf( null != (((object)this._mailNickname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Json.JsonString(this._mailNickname.ToString()) : null, "mailNickname" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.SerializationMode.IncludeReadOnly)) diff --git a/src/Resources/MSGraph.Autorest/generated/cmdlets/NewAzAdUser_CreateExpanded.cs b/src/Resources/MSGraph.Autorest/generated/cmdlets/NewAzAdUser_CreateExpanded.cs index a91dd49ea664..824cbb0db8b8 100644 --- a/src/Resources/MSGraph.Autorest/generated/cmdlets/NewAzAdUser_CreateExpanded.cs +++ b/src/Resources/MSGraph.Autorest/generated/cmdlets/NewAzAdUser_CreateExpanded.cs @@ -243,6 +243,17 @@ public partial class NewAzADUser_CreateExpanded : global::System.Management.Auto PossibleTypes = new [] { typeof(string) })] public string EmployeeId { get => _body.EmployeeId ?? null; set => _body.EmployeeId = value; } + /// employeeOrgData + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "employeeOrgData")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"employeeOrgData", + SerializedName = @"employeeOrgData", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData) })] + public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData EmployeeOrgData { get => _body.EmployeeOrgData ?? null /* object */; set => _body.EmployeeOrgData = value; } + /// /// Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT /// , ge, le, in, startsWith). @@ -398,6 +409,20 @@ public partial class NewAzADUser_CreateExpanded : global::System.Management.Auto PossibleTypes = new [] { typeof(string) })] public string MailNickname { get => _body.MailNickname ?? null; set => _body.MailNickname = value; } + /// + /// Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity + /// types. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types.", + SerializedName = @"manager", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject) })] + public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject Manager { get => _body.Manager ?? null /* object */; set => _body.Manager = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// diff --git a/src/Resources/MSGraph.Autorest/generated/cmdlets/UpdateAzAdUser_UpdateExpanded.cs b/src/Resources/MSGraph.Autorest/generated/cmdlets/UpdateAzAdUser_UpdateExpanded.cs index 40ce23566305..53b3a1bf56e7 100644 --- a/src/Resources/MSGraph.Autorest/generated/cmdlets/UpdateAzAdUser_UpdateExpanded.cs +++ b/src/Resources/MSGraph.Autorest/generated/cmdlets/UpdateAzAdUser_UpdateExpanded.cs @@ -243,6 +243,17 @@ public partial class UpdateAzADUser_UpdateExpanded : global::System.Management.A PossibleTypes = new [] { typeof(string) })] public string EmployeeId { get => _body.EmployeeId ?? null; set => _body.EmployeeId = value; } + /// employeeOrgData + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "employeeOrgData")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"employeeOrgData", + SerializedName = @"employeeOrgData", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData) })] + public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData EmployeeOrgData { get => _body.EmployeeOrgData ?? null /* object */; set => _body.EmployeeOrgData = value; } + /// /// Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT /// , ge, le, in, startsWith). @@ -413,6 +424,20 @@ public partial class UpdateAzADUser_UpdateExpanded : global::System.Management.A PossibleTypes = new [] { typeof(string) })] public string MailNickname { get => _body.MailNickname ?? null; set => _body.MailNickname = value; } + /// + /// Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity + /// types. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types.", + SerializedName = @"manager", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject) })] + public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject Manager { get => _body.Manager ?? null /* object */; set => _body.Manager = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// diff --git a/src/Resources/MSGraph.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/Resources/MSGraph.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index d47853dd6575..dd33a5c5c6a8 100644 --- a/src/Resources/MSGraph.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/Resources/MSGraph.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -163,7 +163,7 @@ protected override void ProcessRecord() if (previewVersion != null) { - sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'"); } sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule MSGraph".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); diff --git a/src/Resources/MSGraph.Autorest/internal/New-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/internal/New-AzADUser.ps1 index f8ddef2b6fac..712c1a490860 100644 --- a/src/Resources/MSGraph.Autorest/internal/New-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/internal/New-AzADUser.ps1 @@ -20,8 +20,13 @@ Add new entity to users .Description Add new entity to users .Example +$password = "xxxxxxxxxx" $pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password} New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn +.Example +$password = "xxxxxxxxxx" +$password = ConvertTo-SecureString -AsPlainText -Force $password +New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn .Outputs Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser @@ -30,11 +35,20 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EMPLOYEEORGDATA : employeeOrgData + [(Any) ]: This indicates any property can be added to this object. + [CostCenter ]: The cost center associated with the user. Returned only on $select. Supports $filter. + [Division ]: The name of the division in which the user works. Returned only on $select. Supports $filter. + IDENTITY : Represents the identities that can be used to sign in to this user account. An identity can be provided by Microsoft (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and tied to a user account. May contain multiple items with the same signInType value. Supports $filter (eq) only where the signInType is not userPrincipalName. [Issuer ]: Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. [IssuerAssignedId ]: Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must be a valid local part of an email addressSupports $filter. 100 character limit. [SignInType ]: Specifies the user sign-in types in your directory, such as emailAddress, userName or federated. Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Additional validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. +MANAGER : Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + [DeletedDateTime ]: + [DisplayName ]: The name displayed in directory + PASSWORDPROFILE : passwordProfile [(Any) ]: This indicates any property can be added to this object. [ForceChangePasswordNextSignIn ]: true if the user must change her password on the next login; otherwise false. If not set, default is false. NOTE: For Azure B2C tenants, set to false and instead use custom policies and user flows to force password reset at first sign in. See Force password reset at first logon. @@ -160,6 +174,13 @@ param( # Supports $filter (eq, ne, NOT , ge, le, in, startsWith). ${EmployeeId}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData] + # employeeOrgData + # To construct, see NOTES section for EMPLOYEEORGDATA properties and create a hash table. + ${EmployeeOrgData}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] @@ -241,6 +262,14 @@ param( # Supports $filter (eq, ne, NOT, ge, le, in, startsWith). ${MailNickname}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject] + # Represents an Azure Active Directory object. + # The directoryObject type is the base type for many other directory entity types. + # To construct, see NOTES section for MANAGER properties and create a hash table. + ${Manager}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] diff --git a/src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1 index cf0a078a53cb..f0286aa94995 100644 --- a/src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -3937,8 +3937,13 @@ Add new entity to users .Description Add new entity to users .Example +$password = "xxxxxxxxxx" $pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password} New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn +.Example +$password = "xxxxxxxxxx" +$password = ConvertTo-SecureString -AsPlainText -Force $password +New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn .Outputs Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser @@ -3947,11 +3952,20 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EMPLOYEEORGDATA : employeeOrgData + [(Any) ]: This indicates any property can be added to this object. + [CostCenter ]: The cost center associated with the user. Returned only on $select. Supports $filter. + [Division ]: The name of the division in which the user works. Returned only on $select. Supports $filter. + IDENTITY : Represents the identities that can be used to sign in to this user account. An identity can be provided by Microsoft (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and tied to a user account. May contain multiple items with the same signInType value. Supports $filter (eq) only where the signInType is not userPrincipalName. [Issuer ]: Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. [IssuerAssignedId ]: Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must be a valid local part of an email addressSupports $filter. 100 character limit. [SignInType ]: Specifies the user sign-in types in your directory, such as emailAddress, userName or federated. Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Additional validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. +MANAGER : Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + [DeletedDateTime ]: + [DisplayName ]: The name displayed in directory + PASSWORDPROFILE : passwordProfile [(Any) ]: This indicates any property can be added to this object. [ForceChangePasswordNextSignIn ]: true if the user must change her password on the next login; otherwise false. If not set, default is false. NOTE: For Azure B2C tenants, set to false and instead use custom policies and user flows to force password reset at first sign in. See Force password reset at first logon. @@ -4077,6 +4091,13 @@ param( # Supports $filter (eq, ne, NOT , ge, le, in, startsWith). ${EmployeeId}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData] + # employeeOrgData + # To construct, see NOTES section for EMPLOYEEORGDATA properties and create a hash table. + ${EmployeeOrgData}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] @@ -4158,6 +4179,14 @@ param( # Supports $filter (eq, ne, NOT, ge, le, in, startsWith). ${MailNickname}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject] + # Represents an Azure Active Directory object. + # The directoryObject type is the base type for many other directory entity types. + # To construct, see NOTES section for MANAGER properties and create a hash table. + ${Manager}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] @@ -6821,11 +6850,20 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EMPLOYEEORGDATA : employeeOrgData + [(Any) ]: This indicates any property can be added to this object. + [CostCenter ]: The cost center associated with the user. Returned only on $select. Supports $filter. + [Division ]: The name of the division in which the user works. Returned only on $select. Supports $filter. + IDENTITY : Represents the identities that can be used to sign in to this user account. An identity can be provided by Microsoft (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and tied to a user account. May contain multiple items with the same signInType value. Supports $filter (eq) only where the signInType is not userPrincipalName. [Issuer ]: Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. [IssuerAssignedId ]: Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must be a valid local part of an email addressSupports $filter. 100 character limit. [SignInType ]: Specifies the user sign-in types in your directory, such as emailAddress, userName or federated. Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Additional validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. +MANAGER : Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + [DeletedDateTime ]: + [DisplayName ]: The name displayed in directory + PASSWORDPROFILE : passwordProfile [(Any) ]: This indicates any property can be added to this object. [ForceChangePasswordNextSignIn ]: true if the user must change her password on the next login; otherwise false. If not set, default is false. NOTE: For Azure B2C tenants, set to false and instead use custom policies and user flows to force password reset at first sign in. See Force password reset at first logon. @@ -6958,6 +6996,13 @@ param( # Supports $filter (eq, ne, NOT , ge, le, in, startsWith). ${EmployeeId}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData] + # employeeOrgData + # To construct, see NOTES section for EMPLOYEEORGDATA properties and create a hash table. + ${EmployeeOrgData}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] @@ -7039,6 +7084,14 @@ param( # Supports $filter (eq, ne, NOT, ge, le, in, startsWith). ${MailNickname}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject] + # Represents an Azure Active Directory object. + # The directoryObject type is the base type for many other directory entity types. + # To construct, see NOTES section for MANAGER properties and create a hash table. + ${Manager}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] diff --git a/src/Resources/MSGraph.Autorest/internal/Update-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/internal/Update-AzADUser.ps1 index 83fce4580d61..0d95edba5953 100644 --- a/src/Resources/MSGraph.Autorest/internal/Update-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/internal/Update-AzADUser.ps1 @@ -29,11 +29,20 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EMPLOYEEORGDATA : employeeOrgData + [(Any) ]: This indicates any property can be added to this object. + [CostCenter ]: The cost center associated with the user. Returned only on $select. Supports $filter. + [Division ]: The name of the division in which the user works. Returned only on $select. Supports $filter. + IDENTITY : Represents the identities that can be used to sign in to this user account. An identity can be provided by Microsoft (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and tied to a user account. May contain multiple items with the same signInType value. Supports $filter (eq) only where the signInType is not userPrincipalName. [Issuer ]: Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. [IssuerAssignedId ]: Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must be a valid local part of an email addressSupports $filter. 100 character limit. [SignInType ]: Specifies the user sign-in types in your directory, such as emailAddress, userName or federated. Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Additional validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. +MANAGER : Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + [DeletedDateTime ]: + [DisplayName ]: The name displayed in directory + PASSWORDPROFILE : passwordProfile [(Any) ]: This indicates any property can be added to this object. [ForceChangePasswordNextSignIn ]: true if the user must change her password on the next login; otherwise false. If not set, default is false. NOTE: For Azure B2C tenants, set to false and instead use custom policies and user flows to force password reset at first sign in. See Force password reset at first logon. @@ -166,6 +175,13 @@ param( # Supports $filter (eq, ne, NOT , ge, le, in, startsWith). ${EmployeeId}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphEmployeeOrgData] + # employeeOrgData + # To construct, see NOTES section for EMPLOYEEORGDATA properties and create a hash table. + ${EmployeeOrgData}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] @@ -247,6 +263,14 @@ param( # Supports $filter (eq, ne, NOT, ge, le, in, startsWith). ${MailNickname}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject] + # Represents an Azure Active Directory object. + # The directoryObject type is the base type for many other directory entity types. + # To construct, see NOTES section for MANAGER properties and create a hash table. + ${Manager}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.String] diff --git a/src/Resources/OpenApiSpecs/v1.0/Users.yml b/src/Resources/OpenApiSpecs/v1.0/Users.yml index e11f5e9441fd..08033e498724 100644 --- a/src/Resources/OpenApiSpecs/v1.0/Users.yml +++ b/src/Resources/OpenApiSpecs/v1.0/Users.yml @@ -1231,6 +1231,8 @@ components: type: string description: 'The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith).' nullable: true + employeeOrgData: + $ref: '#/components/schemas/microsoft.graph.employeeOrgData' employeeType: type: string description: 'Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith).' @@ -1285,6 +1287,8 @@ components: readOnly: true description: 'Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, minorWithOutParentalConsent, minorWithParentalConsent, minorNoParentalConsentRequired, notAdult and adult. Refer to the legal age group property definitions for further information. Returned only on $select.' nullable: true + manager: + $ref: '../CommonTypes.yml#/components/schemas/microsoft.graph.directoryObject' mail: type: string description: 'The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user''s proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith).' @@ -1396,6 +1400,20 @@ components: additionalProperties: type: object description: Represents an Azure Active Directory user object. + microsoft.graph.employeeOrgData: + title: employeeOrgData + type: object + properties: + costCenter: + type: string + description: The cost center associated with the user. Returned only on $select. Supports $filter. + nullable: true + division: + type: string + description: The name of the division in which the user works. Returned only on $select. Supports $filter. + nullable: true + additionalProperties: + type: object microsoft.graph.objectIdentity: title: objectIdentity type: object diff --git a/src/Resources/Resources/Az.Resources.psd1 b/src/Resources/Resources/Az.Resources.psd1 index 650303377f70..702aaf74b27f 100644 --- a/src/Resources/Resources/Az.Resources.psd1 +++ b/src/Resources/Resources/Az.Resources.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 7/27/2022 +# Generated on: 8/29/2022 # @{ @@ -223,7 +223,9 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','Provider','ResourceGroup','Deployment','ActiveDirectory','Authorization','Management','ManagementGroups','Tags' + Tags = 'Azure', 'ResourceManager', 'ARM', 'Provider', 'ResourceGroup', + 'Deployment', 'ActiveDirectory', 'Authorization', 'Management', + 'ManagementGroups', 'Tags' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -254,7 +256,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/Resources/Resources/ChangeLog.md b/src/Resources/Resources/ChangeLog.md index 1ef0894efc24..aa11523800da 100644 --- a/src/Resources/Resources/ChangeLog.md +++ b/src/Resources/Resources/ChangeLog.md @@ -19,6 +19,9 @@ --> ## Upcoming Release +* Fixed bug `-Password` overwrite `-PasswordProfile` in `New-AzADUser` [#19265] +* Exposed `EmployeeOrgData` `Manager` for `Get-AzADUSer` [#18205] +* Exposed parameter `-Count` for `Get-AzADUser` [#16874] ## Version 6.1.0 * Removed the warning messages for MSGraph migration [#18856] diff --git a/src/Resources/Resources/help/Az.Resources.md b/src/Resources/Resources/help/Az.Resources.md index f16f56837f30..2a5117eab7f3 100644 --- a/src/Resources/Resources/help/Az.Resources.md +++ b/src/Resources/Resources/help/Az.Resources.md @@ -252,7 +252,7 @@ Creates key credentials or password credentials for an service principal. Adds new entity to users ### [New-AzDeployment](New-AzDeployment.md) -Create a deployment +Create a deployment at the current subscription scope. ### [New-AzManagedApplication](New-AzManagedApplication.md) Creates an Azure managed application. diff --git a/src/Resources/Resources/help/Get-AzADUser.md b/src/Resources/Resources/help/Get-AzADUser.md index 1d7400c22728..b68b5f4e959f 100644 --- a/src/Resources/Resources/help/Get-AzADUser.md +++ b/src/Resources/Resources/help/Get-AzADUser.md @@ -14,8 +14,8 @@ Lists entities from users or get entity from users by key ### List (Default) ``` -Get-AzADUser [-Expand ] [-Select ] [-First ] [-Skip ] [-AppendSelected] - [-Filter ] [-Orderby ] [-Search ] [-ConsistencyLevel ] +Get-AzADUser [-Count] [-Expand ] [-Select ] [-First ] [-Skip ] + [-AppendSelected] [-Filter ] [-Orderby ] [-Search ] [-ConsistencyLevel ] [-DefaultProfile ] [] ``` @@ -114,6 +114,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Count +Include count of items + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with Azure. diff --git a/src/Resources/Resources/help/Get-AzRoleEligibilitySchedule.md b/src/Resources/Resources/help/Get-AzRoleEligibilitySchedule.md index c10e91746eb7..4d8d48794d09 100644 --- a/src/Resources/Resources/help/Get-AzRoleEligibilitySchedule.md +++ b/src/Resources/Resources/help/Get-AzRoleEligibilitySchedule.md @@ -114,8 +114,6 @@ Name Type 4cd7e26b-8eca-425c-969d-ec708c88bf18 Microsoft.Authorization/roleEligibilitySchedules /subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d /subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/providers/Microsoft.Authorization/… ``` -Get a role eligible schedules by scope and name - ## PARAMETERS ### -DefaultProfile diff --git a/src/Resources/Resources/help/New-AzADUser.md b/src/Resources/Resources/help/New-AzADUser.md index 7a9d874586f8..42dcd2c46bdf 100644 --- a/src/Resources/Resources/help/New-AzADUser.md +++ b/src/Resources/Resources/help/New-AzADUser.md @@ -12,6 +12,7 @@ Adds new entity to users ## SYNTAX +### WithPassword (Default) ``` New-AzADUser -DisplayName -MailNickname -UserPrincipalName -Password [-AboutMe ] [-AccountEnabled ] [-AgeGroup ] [-Birthday ] [-City ] @@ -20,12 +21,27 @@ New-AzADUser -DisplayName -MailNickname -UserPrincipalName ] [-ExternalUserState ] [-ExternalUserStateChangeDateTime ] [-FaxNumber ] [-GivenName ] [-HireDate ] [-Interest ] [-IsResourceAccount] [-JobTitle ] [-Mail ] [-MobilePhone ] [-MySite ] [-OfficeLocation ] - [-ImmutableId ] [-OtherMail ] [-PasswordPolicy ] - [-PasswordProfile ] [-PostalCode ] [-PreferredLanguage ] - [-PreferredName ] [-Responsibility ] [-School ] [-ShowInAddressList] - [-Skill ] [-State ] [-StreetAddress ] [-Surname ] [-UsageLocation ] - [-UserType ] [-ForceChangePasswordNextLogin] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-ImmutableId ] [-OtherMail ] [-PasswordPolicy ] [-PostalCode ] + [-PreferredLanguage ] [-PreferredName ] [-Responsibility ] [-School ] + [-ShowInAddressList] [-Skill ] [-State ] [-StreetAddress ] [-Surname ] + [-UsageLocation ] [-UserType ] [-ForceChangePasswordNextLogin] [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### WithPasswordProfile +``` +New-AzADUser -DisplayName -MailNickname -UserPrincipalName [-AboutMe ] + [-AccountEnabled ] [-AgeGroup ] [-Birthday ] [-City ] + [-CompanyName ] [-ConsentProvidedForMinor ] [-Country ] [-DeletedDateTime ] + [-Department ] [-DeviceEnrollmentLimit ] [-EmployeeHireDate ] [-EmployeeId ] + [-EmployeeType ] [-ExternalUserState ] [-ExternalUserStateChangeDateTime ] + [-FaxNumber ] [-GivenName ] [-HireDate ] [-Interest ] [-IsResourceAccount] + [-JobTitle ] [-Mail ] [-MobilePhone ] [-MySite ] [-OfficeLocation ] + [-ImmutableId ] [-OtherMail ] [-PasswordPolicy ] [-PostalCode ] + [-PreferredLanguage ] [-PreferredName ] [-Responsibility ] [-School ] + [-ShowInAddressList] [-Skill ] [-State ] [-StreetAddress ] [-Surname ] + [-UsageLocation ] [-UserType ] -PasswordProfile + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -33,13 +49,23 @@ Adds new entity to users ## EXAMPLES -### Example 1: Create user +### Example 1: Create user with password profile ```powershell +$password = "xxxxxxxxxx" $pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password} New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn ``` -Create user +Create user with password profile + +### Example 2: Create user with password +```powershell +$password = "xxxxxxxxxx" +$password = ConvertTo-SecureString -AsPlainText -Force $password +New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn +``` + +Create user with password ## PARAMETERS @@ -363,7 +389,7 @@ Default behavior is (false) to not change the password on the next successful lo ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: WithPassword Aliases: Required: False @@ -585,7 +611,7 @@ It is recommended to set a strong password. ```yaml Type: System.Security.SecureString -Parameter Sets: (All) +Parameter Sets: WithPassword Aliases: Required: True @@ -619,10 +645,10 @@ To construct, see NOTES section for PASSWORDPROFILE properties and create a hash ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile -Parameter Sets: (All) +Parameter Sets: WithPasswordProfile Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False diff --git a/src/Resources/Resources/help/Remove-AzADUser.md b/src/Resources/Resources/help/Remove-AzADUser.md index 19ba4cd5d441..ac3db3836cbb 100644 --- a/src/Resources/Resources/help/Remove-AzADUser.md +++ b/src/Resources/Resources/help/Remove-AzADUser.md @@ -236,6 +236,10 @@ To create the parameters described below, construct a hash table containing the - `[DeviceVersion ]`: For internal use only. - `[EmployeeHireDate ]`: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in). - `[EmployeeId ]`: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). + - `[EmployeeOrgData ]`: employeeOrgData + - `[(Any) ]`: This indicates any property can be added to this object. + - `[CostCenter ]`: The cost center associated with the user. Returned only on $select. Supports $filter. + - `[Division ]`: The name of the division in which the user works. Returned only on $select. Supports $filter. - `[EmployeeType ]`: Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). - `[ExternalUserState ]`: For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Supports $filter (eq, ne, NOT , in). - `[ExternalUserStateChangeDateTime ]`: Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, NOT , in). @@ -249,6 +253,9 @@ To create the parameters described below, construct a hash table containing the - `[JobTitle ]`: The user's job title. Maximum length is 128 characters. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). - `[Mail ]`: The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith). - `[MailNickname ]`: The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). + - `[Manager ]`: Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + - `[DeletedDateTime ]`: + - `[DisplayName ]`: The name displayed in directory - `[OfficeLocation ]`: The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). - `[OnPremisesImmutableId ]`: This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in).. - `[OnPremisesLastSyncDateTime ]`: The last time at which the object was synced with the on-premises directory. 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. Supports $filter (eq, ne, not, ge, le, in). diff --git a/src/Resources/Resources/help/Update-AzADUser.md b/src/Resources/Resources/help/Update-AzADUser.md index 6559c315d904..754f7f58ad23 100644 --- a/src/Resources/Resources/help/Update-AzADUser.md +++ b/src/Resources/Resources/help/Update-AzADUser.md @@ -884,6 +884,10 @@ To create the parameters described below, construct a hash table containing the - `[DeviceVersion ]`: For internal use only. - `[EmployeeHireDate ]`: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in). - `[EmployeeId ]`: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). + - `[EmployeeOrgData ]`: employeeOrgData + - `[(Any) ]`: This indicates any property can be added to this object. + - `[CostCenter ]`: The cost center associated with the user. Returned only on $select. Supports $filter. + - `[Division ]`: The name of the division in which the user works. Returned only on $select. Supports $filter. - `[EmployeeType ]`: Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). - `[ExternalUserState ]`: For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Supports $filter (eq, ne, NOT , in). - `[ExternalUserStateChangeDateTime ]`: Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, NOT , in). @@ -897,6 +901,9 @@ To create the parameters described below, construct a hash table containing the - `[JobTitle ]`: The user's job title. Maximum length is 128 characters. Supports $filter (eq, ne, NOT , ge, le, in, startsWith). - `[Mail ]`: The SMTP address for the user, for example, admin@contoso.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. While this property can contain accent characters, using them can cause access issues with other Microsoft applications for the user. Supports $filter (eq, ne, NOT, ge, le, in, startsWith, endsWith). - `[MailNickname ]`: The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). + - `[Manager ]`: Represents an Azure Active Directory object. The directoryObject type is the base type for many other directory entity types. + - `[DeletedDateTime ]`: + - `[DisplayName ]`: The name displayed in directory - `[OfficeLocation ]`: The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). - `[OnPremisesImmutableId ]`: This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in).. - `[OnPremisesLastSyncDateTime ]`: The last time at which the object was synced with the on-premises directory. 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. Supports $filter (eq, ne, not, ge, le, in). diff --git a/tools/StaticAnalysis/Exceptions/Az.Resources/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Resources/BreakingChangeIssues.csv index 777554054d6a..97480ebb9802 100644 --- a/tools/StaticAnalysis/Exceptions/Az.Resources/BreakingChangeIssues.csv +++ b/tools/StaticAnalysis/Exceptions/Az.Resources/BreakingChangeIssues.csv @@ -2,4 +2,5 @@ "Az.Resources","Get-AzADAppFederatedIdentityCredential","Get-AzADAppFederatedIdentityCredential","0","1000","The cmdlet 'Get-AzADAppFederatedIdentityCredential' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Get-AzADAppFederatedIdentityCredential' back to the module, or add an alias to the original cmdlet name." "Az.Resources","New-AzADAppFederatedIdentityCredential","New-AzADAppFederatedIdentityCredential","0","1000","The cmdlet 'New-AzADAppFederatedIdentityCredential' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'New-AzADAppFederatedIdentityCredential' back to the module, or add an alias to the original cmdlet name." "Az.Resources","Remove-AzADAppFederatedIdentityCredential","Remove-AzADAppFederatedIdentityCredential","0","1000","The cmdlet 'Remove-AzADAppFederatedIdentityCredential' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Remove-AzADAppFederatedIdentityCredential' back to the module, or add an alias to the original cmdlet name." -"Az.Resources","Update-AzADAppFederatedIdentityCredential","Update-AzADAppFederatedIdentityCredential","0","1000","The cmdlet 'Update-AzADAppFederatedIdentityCredential' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Update-AzADAppFederatedIdentityCredential' back to the module, or add an alias to the original cmdlet name." \ No newline at end of file +"Az.Resources","Update-AzADAppFederatedIdentityCredential","Update-AzADAppFederatedIdentityCredential","0","1000","The cmdlet 'Update-AzADAppFederatedIdentityCredential' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Update-AzADAppFederatedIdentityCredential' back to the module, or add an alias to the original cmdlet name." +"Az.Resources","New-AzADUser","New-AzADUser","0","1050","The parameter set '__AllParameterSets' for cmdlet 'New-AzADUser' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'New-AzADUser'." \ No newline at end of file