@suvra jyoti I was able to get this work with a GitHub OAuth App with the following values (the other required values can be anything and don't affect the functionality per se)
Authorization Endpoint URL: https://github.com/login/oauth/authorize
Token Endpoint URL: https://github.com/login/oauth/access_token
Client ID: **Get this from your OAuth App**
Client Secret: **Get this from your OAuth App**
In addition to this, you need to copy the authorization code grant flow
redirect URI from the same blade where you enter the above details and set that as the Authorization Callback URL
in your GitHub OAuth App.
The corresponding ARM Template resources when exporting is the following
{
"type": "Microsoft.ApiManagement/service/authorizationServers",
"apiVersion": "2021-08-01",
"name": "[concat(parameters('service_integration_common_apim_name'), '/github-oauth2-0-app')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('service_integration_common_apim_name'))]"
],
"properties": {
"displayName": "GitHub OAuth2.0 App",
"clientRegistrationEndpoint": "https://github.com/",
"authorizationEndpoint": "https://github.com/login/oauth/authorize",
"authorizationMethods": [
"GET"
],
"clientAuthenticationMethod": [
"Body"
],
"tokenBodyParameters": [],
"tokenEndpoint": "https://github.com/login/oauth/access_token",
"supportState": false,
"grantTypes": [
"authorizationCode"
],
"bearerTokenSendingMethods": [
"authorizationHeader"
],
"clientId": "<Client ID of your App>"
}
}