{"id":28524831,"url":"https://github.com/microsoftgraph/msgraph-snippets-go","last_synced_at":"2026-03-04T08:02:37.545Z","repository":{"id":172070506,"uuid":"648775925","full_name":"microsoftgraph/msgraph-snippets-go","owner":"microsoftgraph","description":"Repository of snippets in Microsoft Graph Go SDK documentation.","archived":false,"fork":false,"pushed_at":"2026-02-09T18:43:28.000Z","size":455,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-09T22:44:38.785Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoftgraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-02T19:33:34.000Z","updated_at":"2026-02-09T18:43:39.000Z","dependencies_parsed_at":"2023-12-11T17:30:38.549Z","dependency_job_id":"1522243e-8650-429b-9cd1-175f15933f9b","html_url":"https://github.com/microsoftgraph/msgraph-snippets-go","commit_stats":null,"previous_names":["microsoftgraph/msgraph-snippets-go"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/microsoftgraph/msgraph-snippets-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoftgraph%2Fmsgraph-snippets-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoftgraph%2Fmsgraph-snippets-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoftgraph%2Fmsgraph-snippets-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoftgraph%2Fmsgraph-snippets-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoftgraph","download_url":"https://codeload.github.com/microsoftgraph/msgraph-snippets-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoftgraph%2Fmsgraph-snippets-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-06-09T11:11:41.777Z","updated_at":"2026-03-04T08:02:37.540Z","avatar_url":"https://github.com/microsoftgraph.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microsoft Graph Go SDK Snippets\n\n[![Go](https://github.com/microsoftgraph/msgraph-snippets-go/actions/workflows/go.yml/badge.svg)](https://github.com/microsoftgraph/msgraph-snippets-go/actions/workflows/go.yml) ![License.](https://img.shields.io/badge/license-MIT-green.svg)\n\nThis repository contains sample snippets for the [Microsoft Graph Go SDK](https://github.com/microsoftgraph/msgraph-sdk-go). These snippets are referenced in the [Microsoft Graph SDK documentation](https://learn.microsoft.com/graph/sdks/sdks-overview).\n\n## Prerequisites\n\n- [Go 1.20.x](https://go.dev/)\n\n## Register an app in Azure Active Directory\n\n1. Open a browser and navigate to the [Microsoft Entra admin center](https://entra.microsoft.com) and login using a **Work or School Account**.\n\n1. Expand **Azure Active Directory** in the left-hand navigation, then expand **Applications**, then select **App registrations**.\n\n1. Select **New registration**. Enter a name for your application, for example, `Graph Snippets`.\n\n1. Set **Supported account types** as desired. The options are:\n\n    | Option | Who can sign in? |\n    |--------|------------------|\n    | **Accounts in this organizational directory only** | Only users in your Microsoft 365 organization |\n    | **Accounts in any organizational directory** | Users in any Microsoft 365 organization (work or school accounts) |\n    | **Accounts in any organizational directory ... and personal Microsoft accounts** | Users in any Microsoft 365 organization (work or school accounts) and personal Microsoft accounts |\n\n1. Leave **Redirect URI** empty.\n\n1. Select **Register**. On the application's **Overview** page, copy the value of the **Application (client) ID** and save it, you will need it in the next step. If you chose **Accounts in this organizational directory only** for **Supported account types**, also copy the **Directory (tenant) ID** and save it.\n\n1. Select **Authentication** under **Manage**. Locate the **Advanced settings** section and change the **Allow public client flows** toggle to **Yes**, then choose **Save**.\n\n## Configuring the sample\n\nYou can set these values directly in [.env](src/.env), or you can create a copy of **.env** named **.env.local** and set the values there.\n\n1. Set `CLIENT_ID` to the **Application (client) ID** from your app registration.\n1. If you chose **Accounts in this organizational directory only** for **Supported account types**, set `TENANT_ID` to your **Directory (tenant) ID**.\n\n## Code of conduct\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoftgraph%2Fmsgraph-snippets-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoftgraph%2Fmsgraph-snippets-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoftgraph%2Fmsgraph-snippets-go/lists"}