
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Lightweight python library for easily managing Azure AD (Entra ID) users and groups through the Graph API.
Lightweight python library for easily managing Azure AD (Entra ID) users and groups through the Graph API.
Explore the docs (work in progress)»
·
Report Bug
·
Request Feature
There are many great Azure libraries available on GitHub; however, I didn't find one that really suited my needs, so I created this one to simplify and automate daily tasks.
Features:
Least privilege role | Delegation type | Description |
---|---|---|
GroupMember.ReadWrite.All | Application | To manage user membership groups. |
GroupMember.Read.All | Application | List all the groups available. |
User.ReadWrite.All , User Administrator role | Application | To change user password. |
User.ManageIdentities.All , User.EnableDisableAccount.All | Application | To disable/enable user. |
User.RevokeSessions.All | Application | To revoke user session tokens. |
pip install azure-graph-toolkit
Import library modules
from azure_graph_toolkit import graph_auth, graph_utils
App authentication and authorization. Once get the access token is possible to interact with Azure AD Graph API.
tenant_id = '<tenant Id>'
client_id = '<client (App) Id>'
client_secret = '<client secret>'
access_token = graph_auth.get_access_token(tenant_id, client_id, client_secret)
Add user to AAD group:
result = graph_utils.add_user_to_group('mario.rossi@domain.com', 'block-usb-group', access_token)
print(result)
Remove user from AAD group:
result = graph_utils.remove_user_from_group('mario.rossi@domain.com', 'block-usb-group', access_token)
print(result)
Disable user:
result = graph_utils.set_user_account_status('mario.rossi@domain.com', enable_account=False, access_token)
print(result)
Revoke user sessions:
result = graph_utils.user_revoke_sessions('mario.rossi@domain.com', access_token)
print(result)
Example Output
{'status_code': 204, 'message': 'Success. User mario.rossi@domain.com added to AAD group block-usb-group.'}
{'status_code': 404, 'message': 'No AAD group with a name containing \'block-usb-group\' was found. Please try another group name.'}
Ivano Dibenedetto - @Linkedin - ivano.dibenedetto7@gmail.com
Project Link: https://github.com/Ivanodib/azure-graph-toolkit
FAQs
Lightweight python library for easily managing Azure AD (Entra ID) users and groups through the Graph API.
We found that azure-graph-toolkit 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.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.