Question: As they say, "politics is the exercise of power", and "power is the ability to make things happen in an organisation".
I am working on a project which has some overlap and is partially in competition with other projects. Managers at all levels have different ideas about what should happen. I am trying to understand who is supporting whom, what are the networks I should be aware of, to have a clear idea of where support for our idea might come from.
My line manager doesn't want me to think about politics at all. Other people told me not to be political. But I think these people might have their own agendas - like everybody else. I have seen what happens when you work hard on a project, ignore the politics, and then get backstabbed by some unforeseen person or project.

I do believe that "ignore politics" is bullshit advice: whether you manage people or build things, politics will determine the allocation of resources to your team or project, but I might be wrong.
So, let's ask it this way: **"what are the circumstances when ignoring company politics is good advice?"**

Answer: 
Suppose you have an idea to optimize production.

> 
> what are the circumstances when ignoring company politics is good advice?"
> 
> 
> 

You should ignore the the politics when they are just politics, with no substance behind them. You should ignore them when people are hostile. Another way to put this is "stick with the facts."

> 
> I am trying to understand who is supporting whom, what are the networks I should be aware of, to have a clear idea of where support for our idea might come from. 
> 
> 
> 

This is a good approach. You would want to identify who is hostile to any new ideas so that you present it to them last. You would want to know who would agree with those people no matter what the idea, and present it to them before the hostile person before they are biased. You want to know who is open but skeptical and present it to them almost immediately, so that you can get their feedback and improve your idea. You want to know who else has been championing ideas like it and ask them what objections you can anticipate.

What you don't want to do is introduce new politics or amplify existing politics by: not including someone; waiting until they are on vacation; implementing the idea without getting buy-in; presenting it to someone's manager before presenting it to them. Don't treat anyone differently when the time comes to present it.

From one perspective, this is playing politics. From another perspective, this is acknowledging they exist already and fitting into the world around you to maximize your chance of success.
There is no general answer to this and a good amount depends on your job role / you team' job role. 

My professional work experience has been in audit / accountancy / compliance and recently, cybersecurity. These roles are considered to be conservative and generally risk averse where following regulations are important as not doing so can have serious consequences such as significant fines, regulatory penalties, etc. In these roles , the importance of company policies is generally less important. **Its has been my experience that the more conservative the organization and your role, the less importance of participation in company politics.**

I agree with the others who say to **understand the business climate of the company and who your allies are in the company.** Company politics can be played in positive ways and not have to be negatively applied to put down colleagues. For example in my current role as the team lead on our cybersecurity operations team, I frequently stress the value of our work and try to ensure management is continually aware of how what we are doing is value add for company mission. (security controls engineering, proactive cybersecurity risk management etc.) **I am participating in politics but strictly in a beneficial way. I am not tearing down colleagues , but supporting them and strengthening relationships.**