Adapt the below code with your details:
import requests
import json
url = "https://YOUR_ORCHESTRATOR_HOSTNAME/api/Account/Authenticate"
payload = json.dumps({
"tenancyName": "TENANT_NAME",
"usernameOrEmailAddress": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)