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.1.tar.gz (10.8 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.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mgc_token_tools-0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 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.1.tar.gz
Algorithm Hash digest
SHA256 e0666b47c7fa93947534ced335db7167db2fff78b5c7ea05f8eb31dba610d53d
MD5 7aaf4cc88fc3d3fa6f5d8bcfb51736f0
BLAKE2b-256 518e21cb86f1eeb1995aaa63b69b71f930a8cd31c9b1c555ef644f3cd67ea313

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mgc_token_tools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d8a7ae2fcc4c50ff33910908a3d533e330329c998b280fa5c12a16cd78811f6
MD5 783dc38342da09e1d65c57f42e5fdc3f
BLAKE2b-256 5ed21744d70297c987872e0d302273623e78cd8faa528c54bb0a8f22f10a46f7

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