The king is making the first visit by a Saudi monarch to Indonesia in almost 50 years as part of a tour of Asia, accompanied by a 1,000-strong delegation and hundreds of tons of luggage.
In a speech to hundreds of people at the legislature in the capital Jakarta, he called for an intensified fight against terrorism.
"The challenge we, especially Muslims, face now is terrorism," he said. "We should close ranks in combating terrorism, radicalism and strive to bring world peace for the benefit of all of us."
IS is under pressure in Iraq and Syria, as government forces make a drive to retake areas held by the jihadists.
More From This Section
Saudi Arabia has witnessed a series of deadly attacks claimed by IS since late 2014, mostly targeting the Shiite minority and security forces, killing dozens of people.
However, some of the kingdom's partners in the Middle East have urged the Sunni-majority country to do more to defeat IS, and even accused the kingdom of supporting the jihadists.
A gun and suicide attack in Jakarta in January last year that killed four civilians and four attackers was the first assault claimed by IS in Southeast Asia.
On Thursday Salman also visited Jakarta's Istiqlal mosque, the biggest in Southeast Asia, accompanied by President Joko Widodo, and the leaders prayed together.
The king and his entourage will be in Jakarta until Friday, after which they will head to the Hindu-majority resort island of Bali for a holiday.