Cannot add azure_ai or azure storage extension to Flexible PostgreSQL 16.9

Espen Sandtveit (Webstep AS) 15 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

3 answers

Sort by: Most helpful
  1. Sina Salam 25,921 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://free.blessedness.top/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

  3. Kalyani Kondavaradala 3,230 Reputation points Microsoft External Staff Moderator
    2025-09-03T10:10:07.8+00:00

    Hi Espen Sandtveit (Webstep AS),

    Following up on our earlier discussion, you initially encountered issues creating the Azure AI and Azure storage extension in your PostgreSQL server. As mentioned, we have mitigated this from the backend. Now you will be able to create the extensions from your end.

    I hope this has been helpful!

    Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    If this answers your query, do click Accept Answer and Upvote for was this answer helpful.

    Thanks!

    Kalyani


Your answer

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