Question: We live in chutz lo’oretz and are planning on coming to Israel for Succos. Are we supposed to observe second day Yom Tov while in Israel?
Answer: The view of the vast majority of the Poskim is that observance of Yom Tov sheni is not determined by current location, rather by residency. In other words, one who lives in chutz lo’oretz and visits Eretz Yisroel for Yom Tov should observe Yom Tov sheni, but one who lives in Eretz Yisroel and spends Yom Tov in chutz lo’oretz only keeps one day of Yom Tov.
Having said that, several minority opinions, most notably the Graz (Siman 497) and the Chacham Tzvi (Siman 167) maintained that observance of Yom Tov sheni is dependent on current location, and residency is not the deciding factor.
(Therefore, typically, those affiliated with Chabad follow the rulings of the Graz and will observe Yom Tov sheni based on current location, not residency.)
However, to reiterate, the vast majority of the Poskim do not follow this minority opinion, therefore they rule that one merely visiting observes Yom Tov sheni based on the country of residency.
Therefore, the default position is that if you are visiting Israel for Yom Tov, you should observe Yom Tov sheni.