I am trying to build a custom connector for my API using the swagger doc. I want to secure it with OAuth2 through Azure Active Directory. I have given all the necessary details in the Security section for the connector. However, when I try to use this custom connector to build a new connection, I keep getting this same error even after giving the correct password:

I have followed the instructions in this blog post to setup this connector:
https://flow.microsoft.com/en-us/documentation/customapi-azure-resource-manager-tutorial/
Am I missing something here?