In this paper, a finite element based simulation approach for predicting the effect of microstructure on the stresses resulting from electromigration-induced diffusion is described. The electromigration and stress-driven diffusion equation is solved coupled to the mechanical equilibrium and elastic constitutive equation, where a diffusional inelastic strain is introduced. Here, the focus is on the steady state, infinite life case, when the current-driven diffusion is balanced by the resulting stress gradient. The effect of the crystal orientation in Sn-based solder joints on the limiting current density for an infinite life is investigated and compared to experimental observations in the literature. The effect of the grain structure for Al interconnect lines on the dominant diffusion path and estimates for the effective charge number for two different diffusion paths in Al interconnects determined by matching simulations to experimental measurements of elastic strain components in the literature are also presented.