Hi @Mohammed Irshad ,
What do you mean with the "python app"? Is it a mobile app that could login with your Exchange account or only use the credentials to send emails?
And I am also confused about the "app password", do you mean you lost the password of your Exchange account? If so, you could reset it in your ADUC as it is a on-prem server.
Based on my knowledge, you could use your Exchange password to login these mail apps or send emails, and reset it at:
If I have a misunderstanding on your issue, please fix me.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.