My Friend has German Blue Card. Can he work on payroll for an Indian Company while living in Germany? He has to work in Germany but on Indian payroll.
This is highly dependent on the circumstances and cannot be generally answered.
What type of residence permit and employment in Germany do they have?
If they have a German employer (i.e. pay taxes and social benefits in Germany) plus an extra contract in India, then (when there is no contract conflicts with the German employer) this may be possible.
But residing in Germany and solely working for an Indian employer, would probably be in violation of the residence permit conditions and considered Lohndumping.