Skip to content

Contains scripts to generate access and refresh tokens used in the Microsoft ecosystem (Partner Center/Azure)

Notifications You must be signed in to change notification settings

AdrianM10/microsoft-auth

Repository files navigation

Introduction

This repository contains Python scripts that can generate either an access token or refresh token used for interacting with Partner Center, Azure & Microsoft Graph APIs.

The scripts also require the app credentials (client_id, client_secret) as well as a tenant id stored in the Azure Key Vault that will store the tokens once generated.

The scripts generate and store the auth tokens in Azure Key Vault as secrets, when generating refresh tokens, an expiry date of 90 days is calculated and updated along with the secret.

Usage

  1. Create and activate a virtual environment.

  2. Install dependencies from the requirements.txt file.

  3. Run the Python script by executing 'generate_access_token.py', 'generate_refresh_token.py', 'generate_ms_graph_client.py'.

About

Contains scripts to generate access and refresh tokens used in the Microsoft ecosystem (Partner Center/Azure)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages