While logging in using the AD user credentials into the YARN UI and HDFS UI it shows logged in as knox user. Because of this the logs are also not accessible. Am I supposed to make some changes in the configuration?
Which version of HDP/Ambari are you using ?
If you have already added proxy users:
Also for YARN you can check if it has the "knox" user as added to "yarn.admin.acl"
I see a similar discussion here (For HDP3 but for error 401 it might not be directly related to your issue though): https://community.cloudera.com/t5/Support-Questions/HDP-3-1-0-Knox-proxy-HDFSUI-HTTP-401-Error/m-p/2...
Which talks about the solution as to modify the URL used to access HDFS UI:
Another solution might be to try to insert the following line in the HDFSUI service definition in Knox topology file.
Might be related to : https://issues.apache.org/jira/browse/KNOX-1644