Skip to content

Commit 23a2c67

Browse files
[Resource]Add parameters breaking change warnings for IdentifierUri and DisplayName. (#14660)
* [Resource]Add parameter breaking change for IdentifierUri and DisplayName. * [Resource] updated ChangeLog.md * [Resource]Added upcoming breaking change warnings in ChangeLog.md. Co-authored-by: Beisi Zhou <[email protected]>
1 parent b60e319 commit 23a2c67

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed

src/Resources/Resources/ActiveDirectory/Cmdlets/NewAzureADApplicationCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.WindowsAzure.Commands.Common;
16+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1617
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1718
using System;
1819
using System.Management.Automation;
@@ -39,6 +40,7 @@ public class NewAzureADApplicationCommand : ActiveDirectoryBaseCmdlet
3940
[ValidateNotNullOrEmpty]
4041
public string DisplayName { get; set; }
4142

43+
[CmdletParameterBreakingChange("IdentifierUris", ChangeDescription = "The value will be considered valid only if it exists as a verified domain in a tenant.")]
4244
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ApplicationWithoutCredential,
4345
HelpMessage = "The URIs that identify the application.")]
4446
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ApplicationWithPasswordPlain,

src/Resources/Resources/ActiveDirectory/Cmdlets/NewAzureADServicePrincipalCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureADServicePrincipalCommand : ActiveDirectoryBaseCmdlet
4848
[Parameter(Mandatory = false, ParameterSetName = SimpleParameterSet, HelpMessage = "The application id for which service principal is created.")]
4949
public Guid ApplicationId { get; set; }
5050

51+
[CmdletParameterBreakingChange("DisplayName", ChangeDescription = "DisplayName is used as the IdentifierUri of created application. The value will be considered valid only if it exists as a verified domain in a tenant.")]
5152
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.DisplayNameWithoutCredential,
5253
HelpMessage = "The display name for the application.")]
5354
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.DisplayNameWithPasswordPlain,

src/Resources/Resources/ActiveDirectory/Cmdlets/UpdateAzureADApplicationCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Graph.RBAC.Models;
16+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1617
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1718
using System;
1819
using System.Management.Automation;
@@ -56,6 +57,7 @@ public class UpdateAzureADApplicationCommand : ActiveDirectoryBaseCmdlet
5657
[ValidateNotNullOrEmpty]
5758
public string HomePage { get; set; }
5859

60+
[CmdletParameterBreakingChange("IdentifierUri", ChangeDescription = "The value will be considered valid only if it exists as a verified domain in a tenant.")]
5961
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ApplicationObjectIdWithUpdateParams,
6062
HelpMessage = "The URIs that identify the application.")]
6163
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ApplicationIdWithUpdateParams,

src/Resources/Resources/ActiveDirectory/Cmdlets/UpdateAzureADServicePrincipalCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using System.Linq;
1919
using System.Collections.Generic;
2020
using System.Management.Automation;
21+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2122

2223
namespace Microsoft.Azure.Commands.ActiveDirectory
2324
{
@@ -47,6 +48,7 @@ public class UpdateAzureADServicePrincipalCommand : ActiveDirectoryBaseCmdlet
4748
[ValidateNotNullOrEmpty]
4849
public PSADServicePrincipal InputObject { get; set; }
4950

51+
[CmdletParameterBreakingChange("DisplayName", ChangeDescription = "DisplayName is used as the IdentifierUris of created application. The value will be considered valid only if it exists as a verified domain in a tenant.")]
5052
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SpObjectIdWithDisplayName, HelpMessage = "The display name for the service principal.")]
5153
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SPNWithDisplayName, HelpMessage = "The display name for the service principal.")]
5254
[Parameter(Mandatory = false, ParameterSetName = ParameterSet.InputObjectWithDisplayName, HelpMessage = "The display name for the service principal.")]
@@ -56,6 +58,7 @@ public class UpdateAzureADServicePrincipalCommand : ActiveDirectoryBaseCmdlet
5658
[Parameter(Mandatory = false, HelpMessage = "The homepage for the service principal.")]
5759
public string Homepage { get; set; }
5860

61+
[CmdletParameterBreakingChange("IdentifierUri", ChangeDescription = "The value will be considered valid only if it exists as a verified domain in a tenant.")]
5962
[Parameter(Mandatory = false, HelpMessage = "The identifier URI(s) for the service principal.")]
6063
public string[] IdentifierUri { get; set; }
6164

src/Resources/Resources/ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Added upcoming breaking change warnings on below cmdlets, because the value of IdentifierUri parameter will need verified domain.
23+
- `New-AzADApplication`
24+
- `Update-AzADApplication`
25+
- `New-AzADServicePrincipal`
26+
- `Update-AzADServicePrincipal`
2227
* Ignored bicep warning message in error stream if exitcode equals zero.
2328

2429
## Version 3.4.0

0 commit comments

Comments
 (0)