Is DIN mandatory for directors of foreign company having branch offices in India?

No.