Hi @SHABOU Malek , welcome to Microsoft QnA forum.
You can upgrade the azure PostgreSQL from version 9.6 using dump and restore process as mentioned in below article:
Upgrade your PostgreSQL database using dump and restore
Coming back to DMS for upgradation, as per the same document:
"The migration activity window appears, and the Status of the activity should update to show as Backup in Progress. You may encounter the following error when upgrading from Azure DB for PostgreSQL 9.5 or 9.6:
A scenario reported an unknown error. 28000: no pg_hba.conf entry for replication connection from host "40.121.141.121", user "sr""
I have not tried it myself but it looks with certain changes it is doable as well.
Please let us know if this helps.