npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

msauthify

v3.0.0

Published

Automates Microsoft Azure token fetching

Readme

msauthify

License: MIT Release

  1. :notebook_with_decorative_cover: Description
  2. :warning: Before running
  3. :hammer: Installation
  4. :writing_hand: Usage
  5. :bookmark_tabs: Options
  6. :monocle_face: Examples
  7. :page_with_curl: License
  8. :heart: Contribution

# Description

msauthify is a Node.js application for automating OAuth2 authentication with Microsoft services. It retrieves access tokens by leveraging the resource owner password credentials grant flow. This tool simplifies authentication for developers working with Microsoft APIs.

# Before Running

Ensure that your AWS SSO profiles are configured using aws sso configure and your profiles are configured in a JSON file named msauthify.config. The format of the configuration file should include the following details:

  • custom_application_name: Custom application name.
    • tenantId: The Microsoft Azure tenant ID.
    • clientId: The application (client) ID from Azure.
    • clientSecret: The client secret for the application.
    • scope: The API scopes requested.
    • username: The username of the account for authentication.
    • password: The password of the account for authentication.

The msauthify.config file should be placed as follows:

  • Linux/macOS: ~/msauthify.config
  • Windows: %userprofile%\msauthify.config

# Installation

npm i -g msauthify

# Usage

Basic usage example:

msauthify <profile>

A profile is required. Use --list to see the available profiles defined in msauthify.config.

The application will authenticate using the credentials provided in msauthify.config and output the access token.

# Options

| Option | Description | | --------------- | -------------------------------------------------------------------- | | -l, --list | List available profiles from msauthify.config | | -d, --decode | Decode the JWT and output its header and payload as JSON | | -c, --copy | Copy the token to the system clipboard | | -h, --help | Show help | | -v, --version | Show version |

--copy works on macOS, Windows and Linux out of the box (powered by clipboardy).

Combine --copy with --decode to copy the decoded JWT (as JSON) instead of the raw token.

# Examples

Linux: ~/msauthify.config
Windows: %userprofile%/msauthify.config

{
    "custom_application_name_1": {    
        "tenantId": "app1_tenantId",
        "clientId": "app1_clientId",
        "clientSecret": "app1_clientSecret",
        "scope": "app1_scope",
        "username": "[email protected]",
        "password": "app1_password"
    },
    "custom_application_name_2": {    
        "tenantId": "app2_tenantId",
        "clientId": "app2_clientId",
        "clientSecret": "app2_clientSecret",
        "scope": "app2_scope",
        "username": "[email protected]",
        "password": "app2_password"
    },
    ...
}

Token Output:

$ msauthify custom_application_name_1
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Inp...

List Profiles Output:

$ msauthify --list
custom_application_name_1
custom_application_name_2

Decoded JWT Output:

$ msauthify --decode custom_application_name_1
{
  "header": {
    "typ": "JWT",
    "alg": "RS256",
    "kid": "..."
  },
  "payload": {
    "aud": "...",
    "iss": "...",
    "exp": 1700000000,
    "scp": "...",
    ...
  }
}

Copy Token to Clipboard:

$ msauthify --copy custom_application_name_1
Token for 'custom_application_name_1' copied to clipboard

# License

Distributed under the MIT License. See LICENSE for more information.

# Contributing

We welcome contributions to improve the functionality of msauthify! Here's how you can contribute:

  1. Fork the project
  2. Create a new feature branch (git checkout -b feature/YourFeature)
  3. Make your changes and commit (git commit -m 'Add feature')
  4. Push to your branch (git push origin feature/YourFeature)
  5. Open a pull request

Your contributions will be greatly appreciated!

:star: Feel free to contribute :star: