PyIMAPISession.QueryIdentity

string = QueryIdentity()

Returns the entry identifier of the object that provides the primary identity for the session.