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 / Need help to create a ...
Power Automate
Suggested Answer

Need help to create a custom connector in Power Platform

(0) ShareShare
ReportReport
Posted on by 5
Hello,
 
I’m building two custom connectors in Power Apps / Power Automate to integrate with a legacy App's WCF service that uses Azure AD (OAuth2, PKCE) for authentication and requires a separate STS security token before calling the SOAP service.
 
I need some guidance on how to do this.
 
Regards
Sakshi Kaul
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    2,265 on at
     You’re trying to bridge modern OAuth (Azure AD + PKCE) with a legacy WCF + STS token model—and that’s exactly where custom connectors in Microsoft Power Apps / Microsoft Power Automate start to hit limitations.
     
    What’s really happening
    Your flow is:
    • Authenticate via Microsoft Entra ID (OAuth2 + PKCE)
    • Call STS → get security token
    • Call WCF SOAP service using that token
    Problem:
    • Custom connectors support OAuth2
    • But  do NOT support multi-step token exchange flows (STS chaining)
    Key limitation
    Power Platform custom connectors cannot dynamically:
    • Call STS
    • Extract token
    • Inject into next request (SOAP header)
    Especially with:
    • SOAP + WS-Security headers
    • Token transformation
    Recommended architecture (best practice)
    Use a middleware layer (MANDATORY for your scenario)
     
    Build a wrapper using:
    • Azure Functions (best)
      • OR
    • Azure API Management
    Architecture flow

    Power Apps / Power Automate
            ↓
    Custom Connector (OAuth2 only)
            ↓
    Azure Function / APIM
            ↓
    1. Get STS Token
    2. Call WCF SOAP
    3. Return response

    How to implement (step-by-step)
    Step 1: Custom Connector (simple)
    • Use OAuth2 (Azure AD)
    • Expose only:
      • Clean REST endpoints (not SOAP)
    Step 2: Azure Function (core logic)
    Inside function:
    1. Acquire AAD token
    (using Managed Identity or On-Behalf-Of)
    2. Call STS endpoint
    // pseudo
    • var stsToken = CallSTS(aadToken);
    3. Call WCF SOAP service
    Build SOAP envelope
    Inject STS token into header
     
    4. Return JSON response
     
     Step 3: Transform SOAP → REST
     
    Important:
    • Power Apps works best with JSON
    • Convert SOAP response → JSON
    Custom connectors alone cannot handle OAuth + STS + SOAP chaining
    → You need a middleware layer (Azure Function or APIM)
  • SK-21022312-0 Profile Picture
    5 on at
    Thank you for the response. This was helpful :)

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 957

#2
Valantis Profile Picture

Valantis 847

#3
Haque Profile Picture

Haque 609

Last 30 days Overall leaderboard