diff --git a/src/Resources/Authorization.Autorest/create-model-cmdlets.ps1 b/src/Resources/Authorization.Autorest/create-model-cmdlets.ps1 index aa7fec607bdd..37e6920bc500 100644 --- a/src/Resources/Authorization.Autorest/create-model-cmdlets.ps1 +++ b/src/Resources/Authorization.Autorest/create-model-cmdlets.ps1 @@ -23,9 +23,13 @@ function CreateModelCmdlet { } $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' - $ModuleName = '' $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' $null = New-Item -ItemType Directory -Force -Path $OutputDir + if ('Az.Resources'.length -gt 0) { + $ModuleName = 'Az.Resources' + } else { + $ModuleName = 'Az.Authorization' + } $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs $Content = '' @@ -64,10 +68,10 @@ function CreateModelCmdlet { $ObjectType = $Model $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" # remove duplicated module name - if ($ObjectType.StartsWith($ModuleName)) { + if ($ObjectType.StartsWith('')) { $ModulePrefix = '' } else { - $ModulePrefix = $ModuleName + $ModulePrefix = '' } $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir @@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} .Link -https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object #> function New-Az${ModulePrefix}${ObjectType}Object { [OutputType('${ObjectTypeWithNamespace}')] diff --git a/src/Resources/Authorization.Autorest/docs/Az.Authorization.md b/src/Resources/Authorization.Autorest/docs/Az.Authorization.md index 375fc170efe5..da65b77fa1ce 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: 6fd3fa0e-907d-4510-9563-4edf3773736d +Module Guid: 5d67217e-5bcb-4c75-80ab-67f60154a5b2 Download Help Link: https://learn.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 0dd9fc3cb7a6..de03dda3e34c 100644 --- a/src/Resources/Authorization.Autorest/generate-info.json +++ b/src/Resources/Authorization.Autorest/generate-info.json @@ -1,8 +1,8 @@ { - "swagger_commit": "2278f5552561a7959a49a1e38cb7ddbb349d1589", - "autorest_core": "3.9.3", "node": "v14.15.5", - "autorest_modelerfour": "4.15.414", - "autorest_powershell": "3.0.498", - "autorest": "`-- (empty)" + "autorest_powershell": "3.0.502", + "autorest_core": "3.9.4", + "swagger_commit": "b187f8bbf2171697f327ad16577c1b9cba2ef18e", + "autorest": "`-- (empty)", + "autorest_modelerfour": "4.15.414" } diff --git a/src/Resources/MSGraph.Autorest/README.md b/src/Resources/MSGraph.Autorest/README.md index a50850b4b478..5bd1b88a1d6c 100644 --- a/src/Resources/MSGraph.Autorest/README.md +++ b/src/Resources/MSGraph.Autorest/README.md @@ -211,7 +211,12 @@ directive: - where: subject: UserSigned$ hide: true - + - where: + parameter-name: AccountEnabled + verb: Update + subject: User + set: + parameter-description: "true for enabling the account; otherwise, false. Always true when combined with `-Password`. `-AccountEnabled $false` is ignored when changing the account's password." - where: verb: Get variant: ^List(.*) diff --git a/src/Resources/MSGraph.Autorest/create-model-cmdlets.ps1 b/src/Resources/MSGraph.Autorest/create-model-cmdlets.ps1 index 37668dfc3c5b..200f9b33d768 100644 --- a/src/Resources/MSGraph.Autorest/create-model-cmdlets.ps1 +++ b/src/Resources/MSGraph.Autorest/create-model-cmdlets.ps1 @@ -23,9 +23,13 @@ function CreateModelCmdlet { } $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' - $ModuleName = 'AD' $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' $null = New-Item -ItemType Directory -Force -Path $OutputDir + if ('Az.Resources'.length -gt 0) { + $ModuleName = 'Az.Resources' + } else { + $ModuleName = 'Az.MSGraph' + } $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs $Content = '' @@ -64,10 +68,10 @@ function CreateModelCmdlet { $ObjectType = $Model $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" # remove duplicated module name - if ($ObjectType.StartsWith($ModuleName)) { + if ($ObjectType.StartsWith('AD')) { $ModulePrefix = '' } else { - $ModulePrefix = $ModuleName + $ModulePrefix = 'AD' } $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir @@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} .Link -https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object #> function New-Az${ModulePrefix}${ObjectType}Object { [OutputType('${ObjectTypeWithNamespace}')] diff --git a/src/Resources/MSGraph.Autorest/custom/Get-AzADAppFederatedIdentityCredential.ps1 b/src/Resources/MSGraph.Autorest/custom/Get-AzADAppFederatedIdentityCredential.ps1 index 6fdc3cfcdfbc..3f421ab1d61e 100644 --- a/src/Resources/MSGraph.Autorest/custom/Get-AzADAppFederatedIdentityCredential.ps1 +++ b/src/Resources/MSGraph.Autorest/custom/Get-AzADAppFederatedIdentityCredential.ps1 @@ -20,7 +20,7 @@ Get federatedIdentityCredentials by Id from applications. .Description Get federatedIdentityCredentials by Id from applications. .Link -https://learn.microsoft.com/powershell/module/az.resources/get-azadappfederatedidentitycredentials +https://learn.microsoft.com/powershell/module/az.resources/get-azadappfederatedcredential #> function Get-AzADAppFederatedCredential { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphFederatedIdentityCredential])] diff --git a/src/Resources/MSGraph.Autorest/custom/New-AzADAppFederatedIdentityCredential.ps1 b/src/Resources/MSGraph.Autorest/custom/New-AzADAppFederatedIdentityCredential.ps1 index 8a53c0b28359..3f01ba0e17cd 100644 --- a/src/Resources/MSGraph.Autorest/custom/New-AzADAppFederatedIdentityCredential.ps1 +++ b/src/Resources/MSGraph.Autorest/custom/New-AzADAppFederatedIdentityCredential.ps1 @@ -20,7 +20,7 @@ Create federatedIdentityCredential for applications. .Description Create federatedIdentityCredential for applications. .Link -https://learn.microsoft.com/powershell/module/az.resources/new-azadappfederatedidentitycredential +https://learn.microsoft.com/powershell/module/az.resources/new-azadappfederatedcredential #> function New-AzADAppFederatedCredential { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphFederatedIdentityCredential])] diff --git a/src/Resources/MSGraph.Autorest/custom/Update-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/custom/Update-AzADUser.ps1 index 2f6e47f62878..b5230699c6ab 100644 --- a/src/Resources/MSGraph.Autorest/custom/Update-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/custom/Update-AzADUser.ps1 @@ -64,11 +64,16 @@ function Update-AzADUser { [System.Boolean] [Alias('EnableAccount')] # true for enabling the account; otherwise, false. + # Always true when combined with `-Password`. + # `-AccountEnabled $false` is ignored when changing the account's password. ${AccountEnabled}, [Parameter()] [SecureString] - # Password for the user. It must meet the tenant's password complexity requirements. It is recommended to set a strong password. + # The password for the user. This property is required when a user is created. + # It can be updated, but the user will be required to change the password on the next login. + # The password must satisfy minimum requirements as speci./fied by the user's passwordPolicies property. + # By default, a strong password is required. When changing the password using this method, AccountEnabled is set to true. ${Password}, [Parameter()] diff --git a/src/Resources/MSGraph.Autorest/docs/Update-AzADUser.md b/src/Resources/MSGraph.Autorest/docs/Update-AzADUser.md index a43b713ffdac..063c8c4f548d 100644 --- a/src/Resources/MSGraph.Autorest/docs/Update-AzADUser.md +++ b/src/Resources/MSGraph.Autorest/docs/Update-AzADUser.md @@ -89,6 +89,8 @@ Update user by user principal name ### -AccountEnabled true for enabling the account; otherwise, false. +Always true when combined with `-Password`. +`-AccountEnabled $false` is ignored when changing the account's password. ```yaml Type: System.Boolean @@ -585,9 +587,14 @@ Accept wildcard characters: False ``` ### -Password -Password for the user. -It must meet the tenant's password complexity requirements. -It is recommended to set a strong password. +The password for the user. +This property is required when a user is created. + +It can be updated, but the user will be required to change the password on the next login. + +The password must satisfy minimum requirements as speci./fied by the user's passwordPolicies property. +By default, a strong password is required. +When changing the password using this method, AccountEnabled is set to true. ```yaml Type: System.Security.SecureString diff --git a/src/Resources/MSGraph.Autorest/exports/Get-AzADAppFederatedCredential.ps1 b/src/Resources/MSGraph.Autorest/exports/Get-AzADAppFederatedCredential.ps1 index 9efbf72aa888..bd5541881000 100644 --- a/src/Resources/MSGraph.Autorest/exports/Get-AzADAppFederatedCredential.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/Get-AzADAppFederatedCredential.ps1 @@ -165,7 +165,7 @@ APPLICATIONOBJECT : application object [DeletedDateTime ]: Date and time when this object was deleted. Always null when the object hasn't been deleted. [DisplayName ]: The name displayed in directory .Link -https://learn.microsoft.com/powershell/module/az.resources/get-azadappfederatedidentitycredentials +https://learn.microsoft.com/powershell/module/az.resources/get-azadappfederatedcredential #> function Get-AzADAppFederatedCredential { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphFederatedIdentityCredential])] diff --git a/src/Resources/MSGraph.Autorest/exports/New-AzADAppFederatedCredential.ps1 b/src/Resources/MSGraph.Autorest/exports/New-AzADAppFederatedCredential.ps1 index 15f104cb5cbb..92024cc0cc1a 100644 --- a/src/Resources/MSGraph.Autorest/exports/New-AzADAppFederatedCredential.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/New-AzADAppFederatedCredential.ps1 @@ -25,7 +25,7 @@ New-AzADAppFederatedCredential -ApplicationObjectId $appObjectId -Audience api:/ .Outputs Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphFederatedIdentityCredential .Link -https://learn.microsoft.com/powershell/module/az.resources/new-azadappfederatedidentitycredential +https://learn.microsoft.com/powershell/module/az.resources/new-azadappfederatedcredential #> function New-AzADAppFederatedCredential { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphFederatedIdentityCredential])] diff --git a/src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1 index 7165a5e05040..66b4ee444634 100644 --- a/src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -1820,7 +1820,7 @@ APPLICATIONOBJECT : application object [DeletedDateTime ]: Date and time when this object was deleted. Always null when the object hasn't been deleted. [DisplayName ]: The name displayed in directory .Link -https://learn.microsoft.com/powershell/module/az.resources/get-azadappfederatedidentitycredentials +https://learn.microsoft.com/powershell/module/az.resources/get-azadappfederatedcredential #> function Get-AzADAppFederatedCredential { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphFederatedIdentityCredential])] @@ -4317,7 +4317,7 @@ New-AzADAppFederatedCredential -ApplicationObjectId $appObjectId -Audience api:/ .Outputs Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphFederatedIdentityCredential .Link -https://learn.microsoft.com/powershell/module/az.resources/new-azadappfederatedidentitycredential +https://learn.microsoft.com/powershell/module/az.resources/new-azadappfederatedcredential #> function New-AzADAppFederatedCredential { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphFederatedIdentityCredential])] @@ -10950,14 +10950,21 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Boolean] # true for enabling the account; otherwise, false. + # Always true when combined with `-Password`. + # `-AccountEnabled $false` is ignored when changing the account's password. ${AccountEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Security.SecureString] - # Password for the user. - # It must meet the tenant's password complexity requirements. - # It is recommended to set a strong password. + # The password for the user. + # This property is required when a user is created. + # + # It can be updated, but the user will be required to change the password on the next login. + # + # The password must satisfy minimum requirements as speci./fied by the user's passwordPolicies property. + # By default, a strong password is required. + # When changing the password using this method, AccountEnabled is set to true. ${Password}, [Parameter()] diff --git a/src/Resources/MSGraph.Autorest/exports/Update-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/exports/Update-AzADUser.ps1 index 863d67ee800a..30bd311245ba 100644 --- a/src/Resources/MSGraph.Autorest/exports/Update-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/exports/Update-AzADUser.ps1 @@ -121,14 +121,21 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Boolean] # true for enabling the account; otherwise, false. + # Always true when combined with `-Password`. + # `-AccountEnabled $false` is ignored when changing the account's password. ${AccountEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Security.SecureString] - # Password for the user. - # It must meet the tenant's password complexity requirements. - # It is recommended to set a strong password. + # The password for the user. + # This property is required when a user is created. + # + # It can be updated, but the user will be required to change the password on the next login. + # + # The password must satisfy minimum requirements as speci./fied by the user's passwordPolicies property. + # By default, a strong password is required. + # When changing the password using this method, AccountEnabled is set to true. ${Password}, [Parameter()] diff --git a/src/Resources/MSGraph.Autorest/generate-info.json b/src/Resources/MSGraph.Autorest/generate-info.json index 0dd9fc3cb7a6..de03dda3e34c 100644 --- a/src/Resources/MSGraph.Autorest/generate-info.json +++ b/src/Resources/MSGraph.Autorest/generate-info.json @@ -1,8 +1,8 @@ { - "swagger_commit": "2278f5552561a7959a49a1e38cb7ddbb349d1589", - "autorest_core": "3.9.3", "node": "v14.15.5", - "autorest_modelerfour": "4.15.414", - "autorest_powershell": "3.0.498", - "autorest": "`-- (empty)" + "autorest_powershell": "3.0.502", + "autorest_core": "3.9.4", + "swagger_commit": "b187f8bbf2171697f327ad16577c1b9cba2ef18e", + "autorest": "`-- (empty)", + "autorest_modelerfour": "4.15.414" } diff --git a/src/Resources/MSGraph.Autorest/generated/cmdlets/UpdateAzAdUser_UpdateExpanded.cs b/src/Resources/MSGraph.Autorest/generated/cmdlets/UpdateAzAdUser_UpdateExpanded.cs index 01b69ea4d30e..3a768ea92131 100644 --- a/src/Resources/MSGraph.Autorest/generated/cmdlets/UpdateAzAdUser_UpdateExpanded.cs +++ b/src/Resources/MSGraph.Autorest/generated/cmdlets/UpdateAzAdUser_UpdateExpanded.cs @@ -38,15 +38,15 @@ public partial class UpdateAzADUser_UpdateExpanded : global::System.Management.A private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// - /// true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter (eq, - /// ne, NOT, and in). + /// true for enabling the account; otherwise, false. Always true when combined with `-Password`. `-AccountEnabled $false` + /// is ignored when changing the account's password. /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter (eq, ne, NOT, and in).")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "true for enabling the account; otherwise, false. Always true when combined with `-Password`. `-AccountEnabled $false` is ignored when changing the account's password.")] [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 = @"true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter (eq, ne, NOT, and in).", + Description = @"true for enabling the account; otherwise, false. Always true when combined with `-Password`. `-AccountEnabled $false` is ignored when changing the account's password.", SerializedName = @"accountEnabled", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter AccountEnabled { get => _body.AccountEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _body.AccountEnabled = value; } diff --git a/src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1 index 2c9237985c39..613e0b91095f 100644 --- a/src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -7361,9 +7361,9 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Management.Automation.SwitchParameter] - # true if the account is enabled; otherwise, false. - # This property is required when a user is created. - # Supports $filter (eq, ne, NOT, and in). + # true for enabling the account; otherwise, false. + # Always true when combined with `-Password`. + # `-AccountEnabled $false` is ignored when changing the account's password. ${AccountEnabled}, [Parameter()] diff --git a/src/Resources/MSGraph.Autorest/internal/Update-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/internal/Update-AzADUser.ps1 index 5ce68613311b..0e56fee1e89a 100644 --- a/src/Resources/MSGraph.Autorest/internal/Update-AzADUser.ps1 +++ b/src/Resources/MSGraph.Autorest/internal/Update-AzADUser.ps1 @@ -65,9 +65,9 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')] [System.Management.Automation.SwitchParameter] - # true if the account is enabled; otherwise, false. - # This property is required when a user is created. - # Supports $filter (eq, ne, NOT, and in). + # true for enabling the account; otherwise, false. + # Always true when combined with `-Password`. + # `-AccountEnabled $false` is ignored when changing the account's password. ${AccountEnabled}, [Parameter()] diff --git a/src/Resources/Resources/Az.Resources.psd1 b/src/Resources/Resources/Az.Resources.psd1 index 583b4a5af8cc..9724b9daa059 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: 2023/2/3 +# Generated on: 3/1/2023 # @{ @@ -224,7 +224,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' @@ -250,7 +252,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/help/New-AzADAppCredential.md b/src/Resources/Resources/help/New-AzADAppCredential.md index a6801d1b6c92..3bdba8867014 100644 --- a/src/Resources/Resources/help/New-AzADAppCredential.md +++ b/src/Resources/Resources/help/New-AzADAppCredential.md @@ -122,30 +122,28 @@ Creates key credentials or password credentials for an application. ## EXAMPLES -### Example 1: Create key credentials for an application - +### Example 1: Create key credentials for application ```powershell -# $ObjectId should be the the 'Object ID' GUID associated with the Azure app registration. -# $CertificateThumbprint should be the thumbprint of the certificate. -# $Cert is the base64 encoded content of the certificate. -$ObjectId = "00000000-0000-0000-0000-000000000000" -$Credential = New-Object -TypeName ` - "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphKeyCredential" ` - -Property @{'Key' = $Cert; - 'Usage' = 'Verify'; - 'Type' = 'AsymmetricX509Cert' -} -New-AzADAppCredential -ObjectId $ObjectId -KeyCredentials $Credential -CustomKeyIdentifier $CertificateThumbprint +# ObjectId is the string representation of a GUID for directory object, application, in Azure AD. +$Id = "00000000-0000-0000-0000-000000000000" +# $cert is Base64 encoded content of certificate +$credential = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphKeyCredential" ` + -Property @{'Key' = $cert; + 'Usage' = 'Verify'; + 'Type' = 'AsymmetricX509Cert' + } +New-AzADAppCredential -ObjectId $Id -KeyCredentials $credential ``` -### Example 2: Create password credentials for an application +Create key credentials for application with object Id $Id +### Example 2: Create password credentials for application ```powershell -# $ApplicationId` should be the the 'Application ID' GUID associated with the Azure app registration. -$ApplicationId = "00000000-0000-0000-0000-000000000000" -Get-AzADApplication -ApplicationId $ApplicationId | New-AzADAppCredential -StartDate $startDate -EndDate $endDate +# ApplicationId is AppId of Application object which is different from directory id in Azure AD. +Get-AzADApplication -ApplicationId $appId | New-AzADAppCredential -StartDate $startDate -EndDate $endDate ``` +Create password credentials for application ## PARAMETERS diff --git a/src/Resources/Resources/help/Remove-AzManagementGroupHierarchySetting.md b/src/Resources/Resources/help/Remove-AzManagementGroupHierarchySetting.md index 62cbd94a7969..ca87f248efba 100644 --- a/src/Resources/Resources/help/Remove-AzManagementGroupHierarchySetting.md +++ b/src/Resources/Resources/help/Remove-AzManagementGroupHierarchySetting.md @@ -1,7 +1,7 @@ --- external help file: Microsoft.Azure.PowerShell.Cmdlets.Resources.dll-Help.xml Module Name: Az.Resources -online version: https://learn.microsoft.com/powershell/module/az.resources/remove-azmanagementgrouphierarchysetting +online version: https://learn.microsoft.com/powershell/module/az.resources/remove-azmanagementgrouphierarchysetting schema: 2.0.0 --- diff --git a/src/Resources/Resources/help/Update-AzADUser.md b/src/Resources/Resources/help/Update-AzADUser.md index 2b13776a1662..5b66fe439159 100644 --- a/src/Resources/Resources/help/Update-AzADUser.md +++ b/src/Resources/Resources/help/Update-AzADUser.md @@ -89,6 +89,7 @@ Update user by user principal name ### -AccountEnabled true for enabling the account; otherwise, false. Always true when combined with `-Password`. +`-AccountEnabled $false` is ignored when changing the account's password. ```yaml Type: System.Boolean @@ -585,9 +586,14 @@ Accept wildcard characters: False ``` ### -Password -Password for the user. -It must meet the tenant's password complexity requirements. -It is recommended to set a strong password. +The password for the user. +This property is required when a user is created. + +It can be updated, but the user will be required to change the password on the next login. + +The password must satisfy minimum requirements as speci./fied by the user's passwordPolicies property. +By default, a strong password is required. +When changing the password using this method, AccountEnabled is set to true. ```yaml Type: System.Security.SecureString @@ -873,7 +879,7 @@ To create the parameters described below, construct a hash table containing the - `[(Any) ]`: This indicates any property can be added to this object. - `[DeletedDateTime ]`: Date and time when this object was deleted. Always null when the object hasn't been deleted. - `[DisplayName ]`: The name displayed in directory - - `[AccountEnabled ]`: true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter (eq, ne, NOT, and in). `-AccountEnabled $false` is ignored when changing the account's password. + - `[AccountEnabled ]`: true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter (eq, ne, NOT, and in). - `[AgeGroup ]`: Sets the age group of the user. Allowed values: null, minor, notAdult and adult. Refer to the legal age group property definitions for further information. Supports $filter (eq, ne, NOT, and in). - `[ApproximateLastSignInDateTime ]`: 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, and eq on null values) and $orderBy. - `[City ]`: The city in which the user is located. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). @@ -917,7 +923,7 @@ To create the parameters described below, construct a hash table containing the - `[(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. - `[ForceChangePasswordNextSignInWithMfa ]`: If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. - - `[Password ]`: The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required. When changing the password using this method, AccountEnabled is set to true. + - `[Password ]`: The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required. - `[PhysicalId ]`: For internal use only. Not nullable. Supports $filter (eq, not, ge, le, startsWith). - `[PostalCode ]`: The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code. Maximum length is 40 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). - `[PreferredLanguage ]`: The preferred language for the user. Should follow ISO 639-1 Code; for example en-US. Supports $filter (eq, ne, NOT, ge, le, in, startsWith). @@ -934,7 +940,7 @@ To create the parameters described below, construct a hash table containing the - `[(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. - `[ForceChangePasswordNextSignInWithMfa ]`: If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. - - `[Password ]`: The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required. When changing the password using this method, AccountEnabled is set to true. + - `[Password ]`: The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required. ## RELATED LINKS