Skip to content

New-AzApiManagementProduct -ApprovalRequired is defaulted to False even when the input is $True #24663

Open
@Ravindra-R-reddy

Description

@Ravindra-R-reddy

Description

Trying to create a APIM product with approval required set to True but the command is setting it to False always.
Sample Script
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
New-AzApiManagementProduct -Context $ApiMgmtContext -ProductId "9876543210" -Title "Unlimite1234656d" -Description "Subscribers have completely unlimited access to the API. Administrator approval is required." -LegalTerms "Free for all" -ApprovalRequired $True -State "Published"

Output:
ProductId : 9876543210
Title : Unlimite1234656d
Description : Subscribers have completely unlimited access to the API. Administrator approval is required.
LegalTerms : Free for all
SubscriptionRequired : True
ApprovalRequired : False

Issue script & Debug output

Sample Script
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
New-AzApiManagementProduct -Context $ApiMgmtContext -ProductId "9876543210" -Title "Unlimite1234656d" -Description "Subscribers have completely unlimited access to the API. Administrator approval is required." -LegalTerms "Free for all" -ApprovalRequired $True -State "Published"

Output:
ProductId            : 9876543210
Title                : Unlimite1234656d
Description          : Subscribers have completely unlimited access to the API. Administrator approval is required.
LegalTerms           : Free for all
SubscriptionRequired : True
ApprovalRequired     : False

Environment data

PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             CBL-Mariner/Linux
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.17.0                Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     4.0.2                 Az.ApiManagement                    {Add-AzApiManagementApiToGateway, Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGrou…
Script     7.2.0                 Az.Compute                          {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent, Add-AzVMDataDisk…}
Script     7.4.1                 Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Add-AzApplicationGatewayBackendAddressPool, Add…
Script     6.16.1                Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
Script     6.1.3                 Az.Storage                          {Add-AzRmStorageContainerLegalHold, Add-AzStorageAccountManagementPolicyAction, Add-AzStorageAccoun…
Script     1.1.3                 Az.Tools.Predictor                  {Disable-AzPredictor, Enable-AzPredictor, Open-AzPredictorSurvey, Send-AzPredictorRating}
Script     0.0.0.10              AzureAD.Standard.Preview            {Add-AzureADApplicationOwner, Add-AzureADDeviceRegisteredOwner, Add-AzureADDeviceRegisteredUser, Ad…
Script     0.9.3                 AzurePSDrive

Error output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    API ManagementService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reported

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions