Retrieves teams users JSON web tokens.
Project description
Teams Puppet
Manages microsoft accounts to retrieve teams JSON web tokens for automating tasks that are not supported by the graph API.
import teams_puppet
import requests
puppet = teams_puppet.Puppet("email", "password")
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"authorization": "Bearer " + puppet.get_token("teams"),
"X-ClientType": "MicrosoftTeamsAngular",
"X-HostAppRing": "general"
}
response = requests.get("https://teams.microsoft.com/api/example", headers=headers)
The token is fetched on puppet initialization. If the token expires, a new one will be fetched automatically.
The puppet can either fetch the teams token that uses the Skype backend scope or the token used to access loki.delve.office.com.
puppet = teams_puppet.Puppet("email", "password")
skype_token = puppet.get_token("teams")
loki_token = puppet.get_token("loki")
Installation
Available on PyPi pypi.org/project/teams-puppet/
pip install teams-puppet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
teams_puppet-0.1.5.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for teams_puppet-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 864385fccd07741062bf19dfddd666ff7c8754b3b96bcf37e3678dbeb1935571 |
|
MD5 | 525d181ccf55468614e61cc669a972a4 |
|
BLAKE2b-256 | c87ea87f597ee951fb36a36346971dd5b4ccdc2621d7ac8e084090f7a0ef5edd |