Cannot add azure_ai or azure storage extension to Flexible PostgreSQL 16.9

Espen Sandtveit (Webstep AS) 0 Reputation points
2025-08-28T09:31:06.01+00:00

When I run the following SQL command:

CREATE EXTENSION IF NOT EXISTS azure_ai;
--output from query:
--Started executing query at Line 3
--permission denied to alter restricted role "azure_pg_admin"

CREATE EXTENSION IF NOT EXISTS azure_storage;
--output from query:
--permission denied to alter restricted role "azure_pg_admin"
--Total execution time: 00:00:00.043

--Running this query with other extensions work fine. I have only found "azure_ai" and "azure_storage" that dont work

I can confirm that the extension has been loaded in the web interface, and is visible in the server parameters(azure.extensions).

These are the extension version that we are working with:
User's image

Server version:

PostgreSQL 16.9 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.2.0, 64-bit

Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. Sina Salam 24,096 Reputation points Volunteer Moderator
    2025-08-28T14:59:09.5366667+00:00

    Hello Espen Sandtveit (Webstep AS),

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you cannot add azure_ai or azure storage extension to Flexible PostgreSQL 16.9.

    Run these checks below as the server admin one after the other, and follow the steps below; if anything fails, the likely cause is either an allow-list or a platform-version limitation:

    -- confirm you are the server admin
    SELECT current_user, session_user;
    -- confirm which extensions are allowed on this server
    SHOW azure.extensions;
    -- if allowed, try enabling
    CREATE EXTENSION IF NOT EXISTS azure_ai;
    CREATE EXTENSION IF NOT EXISTS azure_storage;
    

    If SHOW azure.extensions doesn’t list azure_ai,azure_storage`, add them from the Azure Portal: Server > Server parameters > azure.extensions > azure_ai,azure_storage, Save + restart.

    Note azure_ai is (as documented) a preview integration and may not be available for all PostgreSQL versions or regions as there are reported issues on PG16; if you see permission errors (for example about azure_pg_admin), either redeploy to a known-supported engine/version (PG15) or open a Microsoft Support ticket via your Portal. Read more on allowing and creating extensions and the azure_ai integration docs. - https://learn.microsoft.com/en-us/azure/postgresql/extensions/how-to-allow-extensions

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


  2. Conor Nash 15 Reputation points
    2025-08-28T21:25:32.5533333+00:00

    I am having the same issue with azure_storage. You do not address that azure_storage should be supported, and downgrading the database is not a solution since it requires reprovisioning. Why is this Microsoft feature that was working in v16.8 no longer working in v16.9?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.