azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Import-AzApiManagementApi: AuthorizationServerId is reset when importing an API.

Open johnsrsly opened this issue 3 years ago • 2 comments

Description

Step 1: Run New-AzApiManagementApi and specify -AuthorizationServerId. Authorization is set as expected. Step 2: Run Import-AzApiManagementApi. Authorization is being set to null.

I would expect the import to not have any effect on the AuthorizationServerId, since i cannot specify it in the parameters of Import-AzApiManagementApi.

Issue script & Debug output

New-AzApiManagementApi `
        -Context $ApiMgmtContext `
        -ApiId "test" `
        -Name "test" `
        -ServiceUrl "https://test.com/api" `
        -Path "test" `
        -Protocols @("https") `
        -AuthorizationServerId $AuthorizationServerId

Import-AzApiManagementApi `
    -Context $ApiMgmtContext `
    -ApiId "test" `
    -SpecificationFormat "OpenApiJson" `
    -SpecificationPath $SpecificationPath `
    -Path "test"

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.5
PSEdition                      Core
GitCommitId                    7.2.5
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
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            
---------- -------    ---------- ----            
Script     3.0.0                 Az.ApiManagement

Error output

No response

johnsrsly avatar Jul 06 '22 10:07 johnsrsly

Thank you for your feedback. This has been routed to the support team for assistance.

ghost avatar Jul 06 '22 12:07 ghost

Any thoughts?

johnsrsly avatar Sep 21 '22 06:09 johnsrsly

@johnsrsly Apologies for the late reply. Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.

CC @RakeshMohanMSFT

navba-MSFT avatar Oct 26 '22 05:10 navba-MSFT

@johnsrsly We are unable to reproduce this issue at our end. Please see image below. 1) We created an API with a auth server. 2) We imported an API without specifying any auth server. image

image

Let us know if we are missing something.

RakeshMohanMSFT avatar Oct 28 '22 06:10 RakeshMohanMSFT

Hi @johnsrsly. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

ghost avatar Nov 02 '22 16:11 ghost

Hi @johnsrsly, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

ghost avatar Nov 09 '22 18:11 ghost