Importing API having OAuth section() does not get the API binded with existing oauth instance, still need operating manually on Azure portal or via scripting to get it done.
I also refered to the this document: authorize developer accounts using OAuth 2.0 and API import restrictions and known issues
Simple Swagger API template with security section.
{
"swagger": "2.0",
"info": {
"title": "",
"version": "",
"description": ""
},
"host": "",
"basePath": "",
"schemes": ["https"],
"securityDefinitions": {
"apiKeyHeader": {
"type": "apiKey",
"name": "Ocp-Apim-Subscription-Key",
"in": "header"
},
"apiKeyQuery": {
"type": "apiKey",
"name": "subscription-key",
"in": "query"
},
"oauth2XXXXAzureADOAuthServer": {
"type": "oauth2",
"scopes": {},
"flow": "accessCode",
"authorizationUrl": "https://login.microsoftonline.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/oauth2/authorize",
"tokenUrl": "https://login.microsoftonline.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/oauth2/token"
}
},
"security": [{
"apiKeyHeader": [],
"oauth2XXXXAzureADOAuthServer": []
}, {
"apiKeyQuery": [],
"oauth2XXXXAzureADOAuthServer": []
}],
"paths": {},
"definitions": {},
"tags": []
}
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@ToMakeSense Thank you for your feedback! We will review and provide an update as appropriate.
@vladvino Can you confirm if this is a know restriction from product side?
@KetanChawda-MSFT Yes, API Management does not handle the security definition of OpenAPI document in any way.
In future, please open an Azure support ticket or post your question on Stack Overflow: http://aka.ms/apimso
@mikebudzynski thanks for your updates!
API Management does not handle the security definition of OpenAPI document in any way.
If so, it should be a good idea to indicate this restriction in this document --> API import restrictions and known issues, how do you think?
Most helpful comment
@mikebudzynski thanks for your updates!
If so, it should be a good idea to indicate this restriction in this document --> API import restrictions and known issues, how do you think?