I am documenting this for posterity. After a period of IPSEC tunnel being succesfully up and working beteen Azure VPN Gateway and Fortigate 200 E firewall running FortiOS v6.4.4 build1803 (GA), the tunnel drops and does not re-establish itself for a while (in my case about an hour) and then resume again as if nothing happened.
Fortigate log file contains the following useful entries of which the error "peer SA proposal not match local policy" is indicative:
date=2021-01-03 time=04:22:03 eventtime=1609618924346452242 tz="+0800" logid="0101037129" type="event" subtype="vpn" level="notice" vd="root" logdesc="Progress IPsec phase 2" msg="progress IPsec phase 2" action="negotiate" remip=1.2.3.4 locip=5.6.7.8 remport=500 locport=500 outintf="wan1" cookies="xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxx" user="N/A" group="N/A" useralt="N/A" xauthuser="N/A" xauthgroup="N/A" assignip=N/A vpntunnel="AZURE-XYZ" status="success" init="remote" exch="CREATE_CHILD" dir="outbound" role="responder" result="DONE" version="IKEv2"
date=2021-01-03 time=04:22:03 eventtime=1609618924346420462 tz="+0800" logid="0101037125" type="event" subtype="vpn" level="error" vd="root" logdesc="IPsec phase 2 error" msg="IPsec phase 2 error" action="negotiate" remip=1.2.3.4 locip=5.6.7.8 remport=500 locport=500 outintf="wan1" cookies="xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxx" user="N/A" group="N/A" useralt="N/A" xauthuser="N/A" xauthgroup="N/A" assignip=N/A vpntunnel="AZURE-XYZ" status="negotiate_error" reason="peer SA proposal not match local policy"
date=2021-01-03 time=04:22:03 eventtime=1609618924346376500 tz="+0800" logid="0101037120" type="event" subtype="vpn" level="notice" vd="root" logdesc="Negotiate IPsec phase 1" msg="negotiate IPsec phase 1" action="negotiate" remip=1.2.3.4 locip=5.6.7.8 remport=500 locport=500 outintf="wan1" cookies="xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxx" user="N/A" group="N/A" useralt="N/A" xauthuser="N/A" xauthgroup="N/A" assignip=N/A vpntunnel="AZURE-XYZ" status="success" result="N/A" peer_notif="N/A"
Azure VPN gateway contains no useful diagnostics.
The solution is to install a custom IPSec policy with Azure VPN Gateway as described in this Azure troubleshooting document. Make sure you pick compatible policy options (I chose AES256/SHA256 everywhere) and disable PFS. THe how-to is described here. When you follow the guide you will by default have no IPSec Policy installed - this is counter-intuitive as the gateway of course has a policy, but it is the default one and thus hidden. Just follow the guide.
Upvote or comment if you feel this has saved you some head banging.