High quality whispering gallery mode resonators can greatly enhance the optical field by trapping the light through total internal reflection, which makes these resonators a promising platform for many areas of research, including optical sensing, frequency combs, Raman lasing and cavity QED. Among these resonators, silica microtoroidal resonators are widely used because of their ability to be integrated and to achieve ultrahigh quality factors (above 100 million). However, quality factors of traditional silica toroids gradually decrease over time because there is an intrinsic layer of hydroxyl groups on the silica surface. This layer of hydroxyl groups attracts water molecules in the atmosphere and results in high optical losses. This property of silica degrades the behavior and limits the applications of the integrated silica toroids. In this work, we address this limitation by fabricating integrated microtoroids from silicon oxynitride. The surface of silicon oxynitride has a mixture of hydroxyl groups and fluorine groups. This mixture prevents the formation of a layer of water molecules that causes the optical losses. Our experiments demonstrate that the quality factors of the silicon oxynitride toroids exceed 100 million, and these values are maintained for over two weeks without controlling the storage conditions. As a comparison, quality factors of traditional silica toroids fabricated and stored under same conditions decayed by approximately an order of magnitude over the same duration.