Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
This library aids with the Microsoft graph API for Office 365 business. It uses certificates for the OAuth 2.0 client credentials flow to authenticate a daemon application registered in Azure AD. This makes it suitable to be used in console applications.
as described in A simple Python daemon console application calling Microsoft Graph with its own identity, client certificate variation
see Client Credentials for AzureAD msal
#!/bin/sh
openssl genrsa -out server.pem 2048
openssl req -new -key server.pem -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.pem -out server.crt
openssl x509 -noout -fingerprint -sha1 -inform pem -in server.crt |sed -e 's=:==g' > server.fpr
{
"authority": "https://login.microsoftonline.com/TENANT_ID",
"client_id": "CLIENT_ID",
"scope": [ "https://graph.microsoft.com/.default" ],
"thumbprint": "SRERVER.CRT.FINGERPRINT",
"private_key_file": "PATH_TO_CERTS(can be relative)/server.pem",
"endpoint": "https://graph.microsoft.com/v1.0"
}
from wmgraph.api import MgraphApi
from wmgraph.api.exceptions import MgraphApiError
api = MgraphApi(params='./config.json')
userdata = api.get_user(args.user_id)
or
for user in api.list_users():
print(user)`
twine wheel
FAQs
Microsoft Graph convenience library
We found that wmgraph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.