Salesforce keeps track of the user login history like this. The Application column shows use the application that we have logged in through. So I am using simple-salesforce library to connect with Salesforce, It send a soap request with username, password and security token, so is there any way we can pass application so that we can know we have logged in from out application.

I created the OAuth application in Salesforce and enabled device flow and got a consumer key that is called client_id. I logged into salesforce with following parameter:

Salesforce("username", "password", "security_token", client_id="CONSUMER_KEY")

The XML request body looked like this:

<?xml version="1.0" encoding="utf-8" ?>
                <n1:login xmlns:n1="urn:partner.soap.sforce.com">

XML Request header

{'SOAPAction': 'login', 'charset': 'UTF-8', 'content-type': 'text/xml'}

If anybody has Idea about this, I need some help.


1 Answer 1


At this time, it does not appear to be possible to set the application using simple-salesforce. I've tried setting a number of things in client code, and found none that will cause the application to be updated. Subsequently I contacted Salesforce support and received confirmation that it cannot be updated in current versions of their platform using the SOAP API (which is what simple-salesforce calls behind the scenes).

I was advised by Salesforce support to open an Idea for consideration in future releases: https://success.salesforce.com/ideaView?id=0873A0000003aXDQAY

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .