web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Azure OpenAI on your d...
Copilot Studio
Unanswered

Azure OpenAI on your data: deploying to a different environment than the default one or to existing chatbot

(2) ShareShare
ReportReport
Posted on by

You can now connect Power Virtual Agents to Azure OpenAI on your data natively:

 

The deployment needs to start from the Azure OpenAI studio, after you've added "your data", and by default this creates a new chatbot in the default environment of your Power Platform tenant.

 

Here are workaround steps if you'd like to deploy to a different environment or if you need to enable this for an existing chatbot.
Note that this is subject to change, are the feature is still in preview, and the below guidance is only provided "as is".

Categories:
I have the same question (0)
  • Verified answer
    HenryJammes Profile Picture
    on at

    To target a different environment than the default one:

     

    1. Start from the Azure OpenAI Studio (https://oai.azure.com/)
    2. Configure "Add your data" (select your data source, Azure Cognitive Search, index, column mapping, etc.)
    3. Click on "Deploy to" and "A new Power Virtual Agents bot..."
      HenryJammes_0-1692967750972.png
    4. Select "Continue in Power Virtual Agents"
    5. Stop the URL from loading when you see it starts with this:
      https://web.powerva.microsoft.com/environments/~default/...
    6. Swap the "~default" part of the URL with the environment id of your choice (as of now, only environments located in the US region can have that feature). You can get the environment id from the PVA portal URL of your desired target environment.
    7. Resume the loading of the URL (i.e. press enter)

     

    What happens next:

    1. An "Azure OpenAI" connection will automatically be created for you in your target environment (visible in https://make.powerapps.com/environments/<ENVIRONMENT_ID>/connections
    2. You'll be able to create a new PVA chatbot in the desired environment with the Azure OpenAI on your data connection already configured in the Conversational Boosting topic.

     

    If you'd like to add the Azure OpenAI on your data to an existing bot:

     

    1. Follow the same steps as before but DON'T create a new chatbot, only let the process fully load so that it creates the Azure OpenAI connection in https://make.powerapps.com/environments/<ENVIRONMENT_ID>/connections
    2. In your existing PVA chatbot, go the Create generative answers node of your choice (by default in Conversational Boosting topic, but you can add it anywhere you want)
    3. Edit data sources, and click on "Add connection", and select the Azure OpenAI once that was created.
    4. Edit the Connection properties to match your model configuration, both in the "General" and "Model data" tabs:
      HenryJammes_1-1692968311626.pngHenryJammes_2-1692968339788.pngHenryJammes_3-1692968373877.png

       

    5. Note: alternatively, you can also use the code editor view to do that in the YAML definition:
      E.g.
        actions:
          - kind: SearchAndSummarizeContent
            id: search-content
            userInput: =System.Activity.Text
            variable: Topic.Answer
            azureOpenAIOnYourDataSource:
              connectionReference: cr507_ao.connectionreference.metadata_spo_item_name.9044d6442d4a44418e72b153083ea3cd
              dataSources:
                - indexName: sharepoint-index
                  titleField: metadata_spo_item_name
                  urlField: url
                  filePathField: metadata_spo_item_name
                  contentFields:
                    - content
                  queryType: simple
                  roleInformation: You are an AI assistant
                  limitResponsesToDataContent: =true
              apiVersion: 2023-06-01-preview
              deployment: PowerCATGPT35Turbo
              temperature: =0
              topP: =1
              maxTokens: =1200

     

     When you look at the URL that opens from the Azure OpenAI studio, you can also reverse engineer it directly:

    Then you have these parameters:

    • ?azureSearchResourceId=/subscriptions/<AZURE_SUBSCRIPTION_ID>/resourceGroups/<AZURE_RESOURCE_GROUP_NAME>/providers/Microsoft.Search/searchServices/<AZURE_SEARCH_SERVICE_NAME>&azureSearchIndexName=<INDEX_NAME>&azureSearchQueryType=simple&inScope=true&roleInformation=<SYSTEM_MESSAGE>&azureOpenAIResourceId=/subscriptions/<AZURE_SUBSCRIPTION_ID>/resourceGroups/<AZURE_RESOURCE_GROUP_NAME>/providers/Microsoft.CognitiveServices/accounts/<AZURE_OPENAI_SERVICE_NAME>&azureOpenAIDeploymentId=<AZURE_OPENAI_DEPLOYMENT_NAME>&azureOpenAIApiVersion=2023-06-01-preview&temperature=<TEMPERATURE>&top_p=<TOP_P>&max_tokens=<MAX_TOKENS>&stop=&azureSearchFieldsMappingContentFields=content&azureSearchFieldsMappingFilePathField=<INDEX_COLUMN_NAME_FOR_FILE_NAME>&azureSearchFieldsMappingTitleField=<INDEX_COLUMN_NAME_FOR_TITLE>&azureSearchFieldsMappingUrlField=<INDEX_COLUMN_NAME_FOR_URL>

     

     

  • cg_ds Profile Picture
    6 on at

    I don't see the "Deploy to > A new Power Virtual Agent bot" at all. I didn't come across any prerequisites I needed to be able to see this option. Is this only in a specific region?

  • HenryJammes Profile Picture
    on at

    @cg_ds wrote:

    I don't see the "Deploy to > A new Power Virtual Agent bot" at all. I didn't come across any prerequisites I needed to be able to see this option. Is this only in a specific region?


    The option typically shows up AFTER you have added "on your data"

  • cg_ds Profile Picture
    6 on at

    Thank you, Henry. That was it.

  • HenryJammes Profile Picture
    on at

    Couple of issues I've seen:

    • Make sure both the Azure services/subscriptions and Power Platform environment are in the SAME tenant.
    • Make sure the Azure OpenAI service doesn't have network restrictions.
    • Make sure DLP policies are not blocking the Azure OpenAI connector (it's not listed, so the default behavior should move connectors to Business, so they're allowed).

    You can often get additional details on the error by looking at network traces (F12).

  • Katerina_Ch Profile Picture
    28 on at

    @HenryJammes you literally made my day! Thanks a million for sharing this! 💖

  • YassineI Profile Picture
    55 on at

    Thank you Henry for this very useful helper ! 

     

    If people still struggle to get their Open AI connexion there is a trick that worked for me. 

    When i clicked on 

    YassineI_0-1695724340798.png

    I quickly copied the URL. Then via notepad I edited the environment ID then copy paste the new URL to my browser.

     

    There a loading message saying that it's creating the OpenAI connexion. When it's loaded, close the window and go back to your solution in your environment => the newly created connexion will be visible here 

    YassineI_2-1695724615560.png

     

    I hope it helps !

    Yassine 

  • helal Profile Picture
    36 on at

    Hello,

    I have requested my tenant access to Azure Open AI, i do not currentlly have access to.

     

     

    Hello,

    My connection is still not  showing. I believe the AI service and Powerapps tenants are different. I am not sure how to change this?

    helal_0-1701688598607.png

     

  • Hjesus Profile Picture
    2 on at

    Hi Henry, 

    I have configured everything and at first glance everything seems correct, but it returns this error. Any idea what could happen?

     

    Thanks in advance

     

    Hjesus_0-1701706029286.png

     

  • helal Profile Picture
    36 on at

    Hi @HenryJammes ,

     

    I am still not seeing my connection. They are within the same tenant.

    Azure Open AI does not have any restrictions.

    I am not sure how to check and fix DLP policies. Can you please help?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard