Terrain elevation from coordinates

I am able to get height/elevation of terrain for specific coordinates only after “flying” to that location, how can I retrieve elevation same without “flying” there?
P.S as I understand viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(longitude, latitude)) returns real value (not “undefined”) only when terrain in rendered/camera is close to that location. Could not find much up to date information related to this topic (I am using 1.115 version).

viewer.camera.flyTo({
    destination: Cesium.Cartesian3.fromDegrees(longitude, latitude),
    orientation: {
        heading: Cesium.Math.toRadians(0),
        pitch: Cesium.Math.toRadians(-35.0),
        roll: 0.0
    },
    complete: () => {
        setTimeout(() => {
            const height = viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(longitude, latitude));
            addSomeModel(viewer, longitude, latitude, height);
        }, 2000);
    }
});

Had the same problem and ended up using the google elevation API for the purpose:

I am sure there are some other clever ways of doing that without external API calls, but it’s a start.

This is of course much better:

  const terrainProvider = await Cesium.CesiumTerrainProvider.fromIonAssetId(1)
  const samples = await Cesium.sampleTerrainMostDetailed(terrainProvider, [new Cesium.Cartographic(0.09817040710155102,0.7867377035983536)])
//samples (0.09817040710155102, 0.7867377035983536, 1060.9343771878423)