{"id":22786039,"url":"https://github.com/hemantksingh/msgraphapi","last_synced_at":"2025-03-30T15:41:30.823Z","repository":{"id":48038877,"uuid":"286728007","full_name":"hemantksingh/msgraphapi","owner":"hemantksingh","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-27T00:59:41.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T17:14:26.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hemantksingh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-11T11:36:26.000Z","updated_at":"2021-09-14T16:24:42.000Z","dependencies_parsed_at":"2022-08-12T17:20:23.408Z","dependency_job_id":null,"html_url":"https://github.com/hemantksingh/msgraphapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantksingh%2Fmsgraphapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantksingh%2Fmsgraphapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantksingh%2Fmsgraphapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantksingh%2Fmsgraphapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hemantksingh","download_url":"https://codeload.github.com/hemantksingh/msgraphapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246342689,"owners_count":20761938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T23:09:01.948Z","updated_at":"2025-03-30T15:41:30.797Z","avatar_url":"https://github.com/hemantksingh.png","language":"C#","readme":"# MS Graph API\n\nProvides integration with MS graph API using the client credentials flow for a [trusted background application](https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-daemon-overview), that does not require a signed-in user for access to the MS Graph API.\n\n## Tools for interacting with MS Graph API\n\nGraph Explorer is a web-based tool that you can use to build and test requests using Microsoft Graph APIs. You can access Graph Explorer at: `https://developer.microsoft.com/en-us/graph/graph-explore`\n\n## Building the application\n\n```sh\n# build with docker\ndocker build -t hemantksingh/msgraphapi .\n\n# build with dotnet\ndotnet build\n```\n\n## Running the application\n\nRunning the application requires the Azure AD [app registration](https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-daemon-app-registration) details for authenticating with MS Identity platform and invoke the MS graph API with a token. The registration details can be provided by adding an `appsettings.secrets.json` file or exported as environment variables\n\n```sh\n\n# create an appsettings.secrets.json file\n{\n  \"AzureAD\": {\n    \"ClientId\": \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n    \"ClientSecret\": \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n    \"TenantId\": \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\"\n  }\n}\n\n\n# or export the following environment variables\nAZUREAD_CLIENT_ID=xxxx\nAZUREAD_CLIENT_SECRET=xxxx\nAZUREAD_TENANT_ID=xxxx\n\n```\n\n### Run with nginx reverse proxy\n\nThis runs the API behind an nginx reverse proxy which has basic authentication enabled\n\n```sh\nauthPassword=\u003cauthPassword\u003e docker compose -f docker-compose-nginx.yml up --build\n```\n\nThe API can be accessed at: http://localhost/azuread/swagger\n\n### Run with haproxy load balancer\n\nThis runs the API behind HAProxy load balancer\n\n```sh\ndocker compose -f docker-compose-haproxy.yml up --build\n```\n\nYou should be able to access\n\n* haproxy `stats` page on the host at http://localhost:1337\n* haproxy prometheus metrics at http://localhost/metrics\n* haproxy [dataplane API](https://www.haproxy.com/blog/new-haproxy-data-plane-api/) at http://localhost:5555 \n```sh\ncurl --get --user admin:adminpwd \\\n    http://localhost:5555/v2/services/haproxy/configuration/backends\n```\n* AzureAD API at http://localhost/azuread/swagger\n\n### Run with dotnet standalone\n\n```sh\ndtonet run\n```\n\nThe AzureAD API can be accessed at: http://localhost:4000/swagger","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemantksingh%2Fmsgraphapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhemantksingh%2Fmsgraphapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemantksingh%2Fmsgraphapi/lists"}