{"id":37191800,"url":"https://github.com/bartvanbenthem/azauth","last_synced_at":"2026-01-14T22:13:28.892Z","repository":{"id":57640527,"uuid":"433860632","full_name":"bartvanbenthem/azauth","owner":"bartvanbenthem","description":"Go module with token package to request Azure Resource Manager and Azure Graph tokens. ","archived":false,"fork":false,"pushed_at":"2023-03-22T11:25:44.000Z","size":3528,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-20T08:03:01.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bartvanbenthem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-01T14:31:23.000Z","updated_at":"2024-04-03T18:07:32.000Z","dependencies_parsed_at":"2024-06-20T07:01:08.264Z","dependency_job_id":"1c21bbe7-d878-4ee1-9030-6f505ea22a72","html_url":"https://github.com/bartvanbenthem/azauth","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bartvanbenthem/azauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartvanbenthem%2Fazauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartvanbenthem%2Fazauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartvanbenthem%2Fazauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartvanbenthem%2Fazauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartvanbenthem","download_url":"https://codeload.github.com/bartvanbenthem/azauth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartvanbenthem%2Fazauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":"2026-01-14T22:13:28.258Z","updated_at":"2026-01-14T22:13:28.882Z","avatar_url":"https://github.com/bartvanbenthem.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# azAUTH\nGo module with token package to request Azure Resource Manager and Azure Graph tokens. \n\n## prerequisites\nInstall azure cli: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest\n\n## create azure spn\n\n#### set variables for creating app registration\n``` shell\n$ spname='\u003c\u003cname-spn\u003e\u003e'\n$ tenantId=$(az account show --query tenantId -o tsv)\n$ subscriptions=('\u003c\u003csubscription-id-01 subscription-id-02 ...\u003e\u003e')\n```\n    \n#### Create the Azure AD application\n``` shell\n$ applicationId=$(az ad app create \\\n    --display-name \"$spname\" \\\n    --identifier-uris \"https://$spname\" \\\n    --query appId -o tsv)\n```\n\n#### Update the application group memebership claims\n``` shell\n$ az ad app update --id $applicationId --set groupMembershipClaims=All\n```\n\n#### Create a service principal for the Azure AD application\n``` shell\n$ az ad sp create --id $applicationId\n```\n\n#### Get the service principal secret\n``` shell\n$ applicationSecret=$(az ad sp credential reset \\\n    --name $applicationId \\\n    --credential-description \"passwrd\" \\\n    --query password -o tsv)\n```\n\n#### Add SPN to the subscriptions as an reader\n``` shell\nfor s in \"${subscriptions[@]}\"; do {\n    az role assignment create --assignee $applicationId --subscription $s --role 'Reader'\n}; done\n```\n\n## set environment variables for auth\nOnce the Azure App registration is created set the following environment variables:\n``` shell\n$ export AZURE_CLIENT_ID='$applicationId'\n$ export AZURE_TENANT_ID=$tenantId\n$ export AZURE_CLIENT_SECRET='$applicationSecret'\n```\n\n## Install and run the example Access Token Printer\n```shell\n$ go get github.com/bartvanbenthem/azauth\n$ cd azauth\n$ sudo cp bin/aztokenprinter /usr/bin\n$ aztokenprinter\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartvanbenthem%2Fazauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartvanbenthem%2Fazauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartvanbenthem%2Fazauth/lists"}