I have a java based azure web app which is trying to connect to an on premise file share and read a file from there. If I try locally its connecting with my ID. but when I am hosting it in the server its giving Access denied error.
I cannot alter the permissions in the file share and set to everyone. How can I read the file by providing the ID or impersonation?
I have tried with below userauthenticator but is not working in the hosting environemt.
UserAuthenticator auth = new StaticUserAuthenticator(domain, userName, password);
Thanks in advance.