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 / Power Automate / Connecting to on-premi...
Power Automate
Answered

Connecting to on-premises gateway - "The 'x-ms-apim-token' header is not valid: the XRM URL is omitted."

(0) ShareShare
ReportReport
Posted on by 16

Installed a gateway successfully on a client device which will be running UI flows, all working fine locally and network test reports successful. When using the 'Run a flow built by Power Automate Desktop (preview)' action in Power Automate, the gateway is available from the drop-down, but the test connection fails. The error is:

Test connection failed. Details: The 'x-ms-apim-token' header is not valid: the XRM URL is omitted.

aqyx_0-1601628342295.png

 

EDIT: When trying to create a UI flow from the Power Automate admin center, I see a RpaMissingXrmInstanceApiUrl error, so it looks to be a CDS issue. This environment does have a valid CDS database, so I'm not sure where the issue lies.

aqyx_0-1601629025160.png

 



I have the same question (0)
  • matow_MSFT Profile Picture
    on at

    @aqyx Sorry you're seeing this! To help with troubleshooting, can you please share the results of the below? Additionally, in some cases, there is a delay of 5+ minutes after the database is created before it is visible in Power Automate. 

     

    • What is the version of the database for the environment as shown in the Power Platform Admin Center (https://admin.powerplatform.com/environments)? The "Database version" field should be visible in the Version tile for the environment. 
    • Visit https://flow.microsoft.com, press Ctrl+Alt+A, and search within the page for "xrmInstanceUrl". Are the values for these three fields filled in (no need to share) or empty? 
    • matow_0-1602030101941.png

       

  • kitUser Profile Picture
    27 on at

    I am experiencing a similar issue. Were you able to resolve this?

    Version: 9.1.0000.23474

    Values are empty

  • Verified answer
    matow_MSFT Profile Picture
    on at

    @kitUser Within the Power Platform Admin Center view of the environment, is there an option to create a database or is one already present? If there's already a database, please try going to Security roles (at top right of the environment page) -> Environment Maker, and add your user account if it is not listed. 

     

    More info on the Environment Maker role

  • kitUser Profile Picture
    27 on at

    @matow Adding my user account to the Environment Maker role resolved this issue. Thank you very much for your help

  • kitUser Profile Picture
    27 on at

    I wanted to provide additional information I found when receiving this error. I hope this helps.

    Steps to produce RpaMissingXrmInstanceApiUrl error

    1. Create new Sandbox Environment
    2. Click Add New Database to new Sandbox Environment
      1. Leave defaults
      2. Click Add
    3. Check Ui Flows in Power Automate

    Steps to work around RpaMissingXrmInstanceApiUrl error

    1. Create new Sandbox Environment
    2. Click to Add New Database to new Sandbox Environment
      1. Click + Select Security Group
      2. Click Cancel
      3. Click Add
    3. Check Ui Flows in Power Automate

    I am unsure why pretending to add a security group to the database fixes this error. Anyone know what I am missing here? 

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 > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard