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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating Custom Connec...
Power Automate
Suggested Answer

Creating Custom Connector and using Environment Variables

(0) ShareShare
ReportReport
Posted on by 2
Hi,
 
When using an environment variable as host parameter in my custom connector, according to https://learn.microsoft.com/en-us/connectors/custom-connectors/environment-variables,
I get the following error message:
 

The request failed with client error: 'Invalid Api definition object. Please specify a valid Swagger 2.0 Url and valid list of ServiceUrls.'. The correlation Id is '56b4c4e2-fd75-456f-bc72-91910df8880f'.
 
 
It looks like I can't use custom variables. What can I do to resolve the issue?
 
Best,
Fabian
Categories:
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    892 on at
     
    There was a similar question asked. Swagger UI is for definition, not an implementation 
     
    Swagger UI does not support path templation, and should be a valid host. Please find the below link for reference 
     
     
     
     
     
      Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
     
     
     
  • Riyaz_riz11 Profile Picture
    4,120 Super User 2026 Season 1 on at
    Hi,
     
    Environment variables in custom connectors have limited support.
    Try hardcoding the host temporarily to confirm the connector works
    Use a workaround through a flow variable instead.
    Raise it with Microsoft support if nothing works.
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz
  • FH-14040556-0 Profile Picture
    2 on at
    Hi,
     
    Microsoft documents it is possible to use environment variables in custom connectors: https://learn.microsoft.com/en-us/connectors/custom-connectors/environment-variables
     
    How would I use a flow variable as host for a custom connector?
     
    Regards
     
  • Suggested answer
    Power Platform Guy Profile Picture
    59 on at
     
    What environment variables ARE supported for
    Supported:
    • Base path
    • Operation path segments
    • Headers
    • Query parameters
    • Request bodies
    • Authentication parameters
    • Policy expressions
    Not supported:
    • host
    • servers[].url
    • serviceUrl
    This limitation applies to:
    • Swagger 2.0 (host, basePath)
    • OpenAPI 3.x (servers.url)
    I would also suggest you to kindly raise a ticket with Microsoft Support Team to get to know about this issue.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 600

#2
Valantis Profile Picture

Valantis 453

#3
11manish Profile Picture

11manish 356

Last 30 days Overall leaderboard