{"id":23577051,"url":"https://github.com/svrooij/tokenmagician","last_synced_at":"2025-05-16T15:35:25.880Z","repository":{"id":269590050,"uuid":"907841603","full_name":"svrooij/TokenMagician","owner":"svrooij","description":"PowerShell module to help getting tokens using managed identities","archived":false,"fork":false,"pushed_at":"2024-12-29T09:38:13.000Z","size":68,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T00:43:52.149Z","etag":null,"topics":["entraid","federated-credentials","managed-identity","powershell"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/TokenMagician/","language":"C#","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/svrooij.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":"svrooij"}},"created_at":"2024-12-24T14:22:05.000Z","updated_at":"2025-02-10T02:44:07.000Z","dependencies_parsed_at":"2024-12-24T17:34:16.360Z","dependency_job_id":null,"html_url":"https://github.com/svrooij/TokenMagician","commit_stats":null,"previous_names":["svrooij/tokenmagician"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svrooij%2FTokenMagician","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svrooij%2FTokenMagician/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svrooij%2FTokenMagician/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svrooij%2FTokenMagician/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svrooij","download_url":"https://codeload.github.com/svrooij/TokenMagician/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254557181,"owners_count":22091069,"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":["entraid","federated-credentials","managed-identity","powershell"],"created_at":"2024-12-26T22:19:11.103Z","updated_at":"2025-05-16T15:35:25.859Z","avatar_url":"https://github.com/svrooij.png","language":"C#","funding_links":["https://github.com/sponsors/svrooij"],"categories":[],"sub_categories":[],"readme":"# TokenMagician 🪄\n\n[![PowerShell gallery version][badge_powershell]][link_powershell]\n[![PowerShell gallery downloads][badge_powershell_downloads]][link_powershell]\n[![License][badge_license]][link_license]\n\nA PowerShell module that will help you get tokens from Entra ID using a managed identity as federated credential [PowerShell Gallery][link_powershell].\n\n## Installation\n\nYou can install the module from the PowerShell Gallery by running the following command:\n\n```powershell\nInstall-Module -Name TokenMagician\n```\n\n## Prerequisites\n\nTo use this module, you need to have an environment with support for managed identities, like Azure Functions, Azure App Services, or Azure Automation. And you need to configure an app registration in Entra ID as described [here](https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity?tabs=microsoft-entra-admin-center\u0026wt.mc_id=SEC-MVP-5004985).\n\n## Usage\n\n```powershell\n# Import the module\nImport-Module TokenMagician\n\n# Get a token\n$token = Get-TmMsiToken -TenantId 'your-tenant-id' -ClientId 'your-client-id' -Scope 'https://graph.microsoft.com/.default'\n\n# Use the token\nImport-Module Microsoft.Graph.Authentication\nImport-Module Microsoft.Graph.Users\nConnect-MgGraph -AccessToken $token\nGet-MgUser -Top 2\n```\n\n## Module loader\n\nApperantly PowerShell shares all assemblies with all loaded modules, if a previously loaded module uses an assembly that you want to use, but it's a different version things fail.\n\nThis module uses code from [Jordan Borean](https://github.com/jborean93) to load the module in its own \"assembly context\", see [this repo](https://github.com/jborean93/PowerShell-ALC/tree/main/ALCLoader)\n\n[badge_license]: https://img.shields.io/github/license/svrooij/TokenMagician?style=for-the-badge\n[link_license]: https://github.com/svrooij/TokenMagician/blob/main/LICENSE.txt\n[badge_powershell]: https://img.shields.io/powershellgallery/v/TokenMagician?style=for-the-badge\u0026logo=powershell\u0026logoColor=white\n[badge_powershell_downloads]: https://img.shields.io/powershellgallery/dt/TokenMagician?style=for-the-badge\u0026logo=powershell\u0026logoColor=white\n[link_powershell]: https://www.powershellgallery.com/packages/TokenMagician/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvrooij%2Ftokenmagician","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvrooij%2Ftokenmagician","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvrooij%2Ftokenmagician/lists"}