Skip to main content

Token management tools for the Microsoft Graph CLI (mgc)

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

mgc-token-tools

Token management tools for the Microsoft Graph CLI (mgc)

!WIP! - This project is a work-in-progress and may not be functional.

Features

  • Print an access or refresh token from the OS keyring for a specific client (via the client id) to pass to another tool
  • FOCI client login similar to Invoke-RefreshTo<X> commands provided by TokenTactics
  • Store a correctly-formatted access or refresh token sourced outside mgc in the mgc token cache
  • Provides aliases for useful first-party Microsoft clients

Installation & Requirements

The script has no external python dependencies, but does use the security command on MacOS or secret-tool on Linux for keyring access.

One option for installation is to download the script and save it to some folder in your $PATH.

#!/bin/bash

wget https://raw.githubusercontent.com/petergs/mgc-token-tools/refs/heads/main/mgc-token-tools -O ~/.local/bin/mgc-token-tools   

Keyring Support

So far, this has been tested with MacOS Keychain and GNOME Keyring on Linux.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mgc_token_tools-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mgc_token_tools-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file mgc_token_tools-0.1.0.tar.gz.

File metadata

  • Download URL: mgc_token_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mgc_token_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e1a7a00e74bb02bc8a2e734dbd47ccadb52cc4a9d634fe5088343e51c9467a4
MD5 4741d49fcefa5dff3cc48ba405d3bb17
BLAKE2b-256 f4a86cd515c04b63a88c3b05f2f54d486cb6af1fe180918791dd0fac4c15416f

See more details on using hashes here.

File details

Details for the file mgc_token_tools-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mgc_token_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aca58d93720f47679c3f2ce9d896de603bc5d96f9d86ad10db092eb3ebc9456
MD5 e5be719fd4164b54cac37b14624d3023
BLAKE2b-256 77fb5825df478e543fe729a4e7f5318347072fd7065dcd7fa7623c284966314b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page