Anyone have success creating a custom connector to connect to an Enterprise Github instance?
Here's my problem:
Tried so far:
Any ideas? Thanks!
Hi @ericonline ,
Could you please share a bit more about your issue?
Could you please share a screenshot about your custom connector's configuration?
Have you taken a try to use Basic Authentication (Username & Password) as authentication way instead of Access Token?
Based on the issue that you mentioned, I have made a test on my side (Basic Authentication and Access Token), and don't have the issue that you mentioned.
Please check and see if the following article would help in your scenario:
More details about creating a custom connector in PowerApps, please check the following video:
https://www.youtube.com/watch?v=dBCS1nPsDiE
Best regards,
Hi @v-xida-msft ,
Thanks for the reply.
Postman details:
- Laptop connection: Company VPN
- Method: GET
- Request URL: https://github.myCompany.com/api/v3/users/myUsername/repos
- Authorization: NTLM Authentication (Beta)
- Username: myUsername
- Password: myPassword
- Advanced:
- Domain: xxx.xxx.myCompany.com
- Workstation: myWorkstationName
- (Also works with) Authorization: OAUTH2.0
- Access Token: Personal Access Token created in Github
- Response:
[ { "id": 5564, "name": "repoName", "full_name": "userName/repoName", "owner": { "login": "userName", "id": 1477, "avatar_url": "https://github.myCompany.com/avatars/u/1477?", "gravatar_id": "", "url": "https://github.myCompany.com/api/v3/users/userName", "html_url": "https://github.myCompany.com/userName", "followers_url": "https://github.myCompany.com/api/v3/users/userName/followers", "following_url": "https://github.myCompany.com/api/v3/users/userName/following{/other_user}", "gists_url": "https://github.myCompany.com/api/v3/users/userName/gists{/gist_id}", "starred_url": "https://github.myCompany.com/api/v3/users/userName/starred{/owner}{/repo}", "subscriptions_url": "https://github.myCompany.com/api/v3/users/userName/subscriptions", "organizations_url": "https://github.myCompany.com/api/v3/users/userName/orgs", "repos_url": "https://github.myCompany.com/api/v3/users/userName/repos", "events_url": "https://github.myCompany.com/api/v3/users/userName/events{/privacy}", "received_events_url": "https://github.myCompany.com/api/v3/users/userName/received_events", "type": "User", "site_admin": false, "ldap_dn": "CN=userName,CN=Users,DC=rails,DC=rwy,DC=myCompany,DC=com" }, "private": false, "html_url": "https://github.myCompany.com/userName/repoName", "description": "TEst", "fork": false, "url": "https://github.myCompany.com/api/v3/repos/userName/repoName", "forks_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/forks", "keys_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/keys{/key_id}", "collaborators_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/collaborators{/collaborator}", "teams_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/teams", "hooks_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/hooks", "issue_events_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/issues/events{/number}", "events_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/events", "assignees_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/assignees{/user}", "branches_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/branches{/branch}", "tags_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/tags", "blobs_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/git/blobs{/sha}", "git_tags_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/git/tags{/sha}", "git_refs_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/git/refs{/sha}", "trees_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/git/trees{/sha}", "statuses_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/statuses/{sha}", "languages_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/languages", "stargazers_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/stargazers", "contributors_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/contributors", "subscribers_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/subscribers", "subscription_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/subscription", "commits_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/commits{/sha}", "git_commits_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/git/commits{/sha}", "comments_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/comments{/number}", "issue_comment_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/issues/comments{/number}", "contents_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/contents/{+path}", "compare_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/compare/{base}...{head}", "merges_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/merges", "archive_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/{archive_format}{/ref}", "downloads_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/downloads", "issues_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/issues{/number}", "pulls_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/pulls{/number}", "milestones_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/milestones{/number}", "notifications_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/notifications{?since,all,participating}", "labels_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/labels{/name}", "releases_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/releases{/id}", "deployments_url": "https://github.myCompany.com/api/v3/repos/userName/repoName/deployments", "created_at": "2018-05-10T16:46:30Z", "updated_at": "2019-04-11T15:02:46Z", "pushed_at": "2018-10-10T16:47:17Z", "git_url": "git://github.myCompany.com/userName/repoName.git", "ssh_url": "git@github.myCompany.com:userName/repoName.git", "clone_url": "https://github.myCompany.com/userName/repoName.git", "svn_url": "https://github.myCompany.com/userName/repoName", "homepage": null, "size": 1214, "stargazers_count": 0, "watchers_count": 0, "language": "TEst", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "open_issues_count": 0, "forks": 0, "open_issues": 0, "watchers": 0, "default_branch": "master" } ]
Custom Connector details:
- Host: github.myCompany.com
- Base URL: /
- Security: Basic Authentication w/ "username" and "password" labels
- New Action: GET_REPO_INFO
- Request: GET, https://github.myCompany.com/api/v3/users/myUsername/repos
- Response:
HEADERS: Server GitHub.com Date Fri, 26 Jul 2019 20:26:37 GMT Content-Type application/json; charset=utf-8 Content-Length 5422 Status 200 OK Cache-Control public, max-age=60, s-maxage=60 Vary Accept ETag "03d7efbf45f31e3de86d4786db0fe997" X-GitHub-Enterprise-Version 2.12.3 X-GitHub-Media-Type github.v3; format=json Access-Control-Expose-Headers ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval Access-Control-Allow-Origin * X-GitHub-Request-Id 9854b2df-e84e-4909-9bc8-2a2823ab4959 Content-Security-Policy default-src 'none' Strict-Transport-Security max-age=31536000; includeSubdomains X-Content-Type-Options nosniff X-Frame-Options deny X-XSS-Protection 1; mode=block X-Runtime-rack 0.049464 BODY: ABOVE RESPONSE FROM POSTMAN PASTED IN WITHOUT THE LEADING "[" AND TRAILING "]"
- Validation: Succeeded
- Click Create Connector
- "Custom Connector has been successfully created"
- Click Test then New Connection
- Enter Windows username and password
- Connection created, navigate back to Custom Connector
- Click Test: "Operation failed (500), see response below"
- Request:
Url https://msmanaged-na.azure-apim.net/apim/enterprisegithub.<redacted>/<redacted>/api/v3/users/myUsername/repos Method get Headers
{
"Authorization": "Bearer <redacted>"
}
- Response:
Status Internal Server Error (500) Headers { "cache-control": "proxy-revalidate", "content-length": "259", "content-type": "application/json" } Body { "error": { "code": 500, "message": "The remote name could not be resolved: 'github.myCompany.com'", "source": "msmanaged-na.azure-apim.net", "path": "forward-request", "clientRequestId": "01aeb31f-4eef-44d0-80c8-9baf-03ccd57d" } }
- Schema Validation: Validation Succeeded
Can you see what I'm doing wrong?
Hi Kris,
I cannot get this to work.
Tried:
Error: "The provided host name 'github.mycompany.com' could not be resolved"
Works in Postman without issue... maybe I'll try Exporting/Importing an OpenAPI definition next.
Hm. Exporting/Importing Postman collection did not work either...
Tried with "No Authentication" and with "Basic Authentication".
Same result:
User | Count |
---|---|
140 | |
136 | |
77 | |
75 | |
69 |
User | Count |
---|---|
224 | |
186 | |
68 | |
64 | |
57 |