Skip to content

az apim api create authorization-server-id does not take effect #25503

@GreenCee

Description

@GreenCee

This is autogenerated. Please review and update as needed.

Describe the bug

--authorization-server-id does not take effect when an API is created using Azure CLI
The API is created however the section for the authenticationSettings remains blank

  "authenticationSettings": {
    "oAuth2": null,
    "openid": null
  },

Should be

  "authenticationSettings": {
    "oAuth2":  "<oAuth2Provider>",
    "openid": null
  }

Of note, this was tested using az rest it did work when running against the CreateOrUpdate endpoint:
https://learn.microsoft.com/en-us/rest/api/apimanagement/current-ga/apis/create-or-update?tabs=HTTP
Where this property is set at: authenticationSettings
Command Name
az apim api create

Errors:

No error reported

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

When --authorization-server-id is set the resulting API created should have an entry like this and the authentications set properly

  "authenticationSettings": {
    "oAuth2":  "<oAuth2Provider>",
    "openid": null
  }

Environment Summary

Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.31, Ubuntu 20.04.5 LTS
Python 3.10.8
Installer: DEB

azure-cli 2.44.1 *

Extensions:
application-insights 0.1.17
account 0.2.5

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions