Azure PostgreSQL Workaround Cannot Found UUID-OSSP in the Azure.Extensions
Hate it or like it, we have to admit that Microsoft product has a lot of bug.
As-of now 2023–04–07, we found bug on the Azure Database for PostgreSQL that we cannot set the value of azure.extension to have UUID-OSSP
.
It has every value except the UUID-OSSP

Then I saw some command
Extensions - Azure Database for PostgreSQL - Flexible Server
Learn about the available PostgreSQL extensions in Azure Database for PostgreSQL - Flexible Server

az postgres flexible-server parameter set
--resource-group <your resource group>
--server-name <your server name>
--subscription <your subscription id>
--name azure.extensions
--value <extension name>,<extension name>
Now how do we know the value

By hovering here, I can see the value that can be set. Then we arrive at:
az postgres flexible-server parameter set
--resource-group my-resource-group
--server-name test-postgres-uuid-001
--subscription 3fdf4b5f-xxxx-xxxx-xxxx-xxxxxxx4815
--name azure.extensions
--value uuid-ossp
Then you go to test it in the PostgreSQL database client. Mine is Dbeaver.
SHOW azure.extensions;
-- Should see uuid-ossp
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Should be able to run without error
SELECT uuid_generate_v4();
-- Then test it, should get back the uuid
Hope this help !