Office politics is something that bugs most of us and we must certainly find a way out.
The query raised by you has been discussed many times in this forum in the past
Please try Cite HR archives.
Type “OFFICE POLITICS.” inside the box ‘Search Cite Co’
that you find in the title bar right above.
After typing in the box, press the 'research' button next to it.
You will get lot of information.
You can also specifically try the one by Mr Ganesh Ramachandran (LIME GANESH)
It is very good , Many of us also contributed to this thread that dates about four years back.
You may read my earlier post on the same topic:
Try as much as you want,but the politician in us cannot be removed.
But one way to maintain harmonious relationship is to be open hearted in behaviour,job oriented and to shun gossip.
Be neutral in your dealings with people and stick to ensuring that office work gets the priority it deserves.