Doubt about using Codeless with Session authType
Hello people!
I need to login in an application and get the session id cookie to work with their API (yes... not good). I was trying to do something like this:
"pollingConfig": { ... "auth": { "authType": "Session", "IsPostPayloadJson": true, "SessionLoginRequestUri": "https://{{placeHolder1}}:443/login.html", "QueryParameters": "{'username': '{{placeHolder2}}', 'password': '{{placeHolder3}}'}", "SessionIdName": "SESSIONID" }
But no success yet... Could anyone tell me if this is possible and provide some examples?
Thanks in advance.
Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.
Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.
Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.
Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.
To log in to an application and obtain the session ID cookie, you will typically need to follow these steps:
- Open the login page of the application in your web browser.
- Enter your login credentials (e.g., username and password).
- Submit the login form.
- Check if the application returns a session ID cookie in the HTTP response headers.
If the application returns a session ID cookie, you can extract the value of the cookie and use it in your subsequent API requests. Example:
import requests
#Set up the login data
login_data = {
'username': 'your_username',
'password': 'your_password'
}
#Send the login request
login_url = 'https://example.com/login'
response = requests.post(login_url, data=login_data)
#Check if the session ID cookie was returned
if 'sessionid' in response.cookies:
# Extract the value of the session ID cookie
session_id = response.cookies['sessionid']
print(f'Session ID: {session_id}')
else:
print('Login failed')
@cupello, can you please provide some update on the above comment?
Since we have not received a response in the last 5 days, we are closing your issue https://github.com/Azure/Azure-Sentinel/issues/5405 as per our standard operating procedures. If you still need support for this issue, feel free to re-open at any time. Thank you for your co-operation.
Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.