You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
First of all, i got so say that's a great tool !
I tried to dump the users from a domain with multiple users that normally causes the paging in responses. Though, I figured out that the get-user command doesn't handle @odata.nextLink so it only returns the users form the first page. Any plan to fix this ? :)
P.S1 : netLinks are n ot handled for any enum command :/ So, enumerating in large domains with multiple users / groups / applications etc will cause missing a lot
This works I've just not had a chance to push everything yet:
defget_user(args):
print_yellow("[*] Get-User")
print("="*80)
api_url="https://graph.microsoft.com/v1.0/users"ifargs.id:
api_url=f"https://graph.microsoft.com/v1.0/users/{args.id}"ifargs.select:
api_url+="?$select="+args.selectuser_agent=get_user_agent(args)
access_token=get_access_token(args.token)
headers= {
'Authorization': f'Bearer {access_token}',
'User-Agent': user_agent
}
whileapi_url:
response=requests.get(api_url, headers=headers)
ifresponse.status_code==200:
response_json=response.json()
# If an ID is provided, print details for that userifargs.id:
forkey, valueinresponse_json.items():
ifkey!="@odata.context":
print(f"{key}: {value}")
else:
if'value'inresponse_json:
foruserinresponse_json['value']:
forkey, valueinuser.items():
print(f"{key}: {value}")
print()
else:
print_red("[-] No users found or unexpected response format")
# Check if there is a nextLink for the next page of resultsapi_url=response_json.get('@odata.nextLink', None)
else:
print_red(f"[-] Failed to retrieve user(s): {response.status_code}")
print_red(response.text)
break# Stop if there's an errorprint("="*80)
### ...defget_group(args):
print_yellow("[*] Get-Group")
print("="*80)
api_url="https://graph.microsoft.com/v1.0/groups"ifargs.id:
api_url=f"https://graph.microsoft.com/v1.0/groups/{args.id}"ifargs.select:
api_url+="?$select="+args.selectuser_agent=get_user_agent(args)
headers= {
'Authorization': f'Bearer {get_access_token(args.token)}',
'User-Agent': user_agent
}
whileapi_url:
response=requests.get(api_url, headers=headers)
ifresponse.status_code==200:
response_json=response.json()
# Print details for a specific group if an ID is providedifargs.id:
forkey, valueinresponse_json.items():
ifkey!="@odata.context":
print(f"{key}: {value}")
else:
if'value'inresponse_json:
forgroupinresponse_json['value']:
forkey, valueingroup.items():
print(f"{key}: {value}")
print()
else:
print_red("[-] No groups found or unexpected response format")
# Check if there is a next link to fetch more resultsapi_url=response_json.get('@odata.nextLink', None)
else:
print_red(f"[-] Failed to retrieve group(s): {response.status_code}")
print_red(response.text)
break# Stop if there's an errorprint("="*80)
Activity
SeiV-K commentedon Mar 30, 2025
Ah, i just noticed it's on your TODO list :)
mlcsec commentedon Apr 2, 2025
This works I've just not had a chance to push everything yet: