Skip to content

Instantly share code, notes, and snippets.

@d4hines
Created June 15, 2018 17:57
Show Gist options
  • Save d4hines/0b0f54cef947c1a351525e94f99320f5 to your computer and use it in GitHub Desktop.
Save d4hines/0b0f54cef947c1a351525e94f99320f5 to your computer and use it in GitHub Desktop.
NTLM to get BID
import requests
from requests_ntlm import HttpNtlmAuth
import json
session = requests.Session()
session.auth = HttpNtlmAuth('DOMAIN\\username', 'password')
url = "https://recruitercrm.regent.edu/CRMRECRUIT/api/data/v8.0/contacts?$filter=datatel_erpid%20eq%20%27B06892407%27"
response = session.get(url)
parsed = json.loads(response.text)
bid = parsed['value'][0]['datatel_erpid']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment