Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Connector Development
Unanswered

Issues with Custom Connector in Power Apps for LinkedIn Post Integration

(1) ShareShare
ReportReport
Posted on by 2
Hi Community,
 
I am learning how to post an article on LinkedIn using Power Automate. I created an Instant Cloud Flow with Power Virtual Agent (PVA) as the trigger. For the action, I selected a third-party service to post an article, filled in all the necessary details, and clicked save. Since I’m using PVA as the trigger, a custom connector is required to run the flow. I created an app in the Developer Portal to obtain the Client ID and Client Secret. I added products like Share on LinkedIn and Sign In with LinkedIn using OpenID Connect for the scope. Currently, we only have the w_member_social scope available, while r_liteprofile and r_emailaddress are missing and not available. However, while generating the access token, we can select scopes like openid, profile, w_member_social, and email. After that, I started creating the custom connector in Power Apps, following the six required steps:
 
1. General Information
Scheme: Selected HTTPS
Host: api.linkedin.com
Base URL: /
 
2. Security
Authentication Type: OAuth 2.0
OAuth 2.0 Settings:
Client ID: 1234567
Client Secret: xx667788
Authorization URL: https://www.linkedin.com/oauth/v2/authorization Token URL: https://www.linkedin.com/oauth/v2/accessToken Refresh URL: https://www.linkedin.com/oauth/v2/accessToken Scope: w_member_social
Redirect URL: https://global.consent.azure-apim.net/redirect/linkedinget-5f45760dxx (This URL is pasted under the Auth settings.)
 
3. Definition
Action:
Summary: LinkedInPost
Operation ID: LinkedInPost
Visibility: Selected None
Import from Sample (Request Tab):
Method: POST
URL: https://api.linkedin.com/v2/ugcPosts
Headers: Bearer Token: Bearer [Access Token] (I am unable to add extra headers here.)
Body:
{
"author": "urn:li:person:xxxxx",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": { "shareCommentary": {
"text": "Check out this insightful article on SQL best practices! #SQL #BestPractices"
},
"shareMediaCategory": "ARTICLE",
"media": [
{
"status": "READY",
"originalUrl": "https://www.geeksforgeeks.org/best-practices-for-sql-query-optimizations/",
"title": "SQL Best Practices",
"description": "Best practices for SQL query optimization."
}
]
}
},
"visibility": { "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
 
4 & 5. (Skipped these steps for now)
 
6. Test
 
Clicked on "New Connection" and selected "Create".
A LinkedIn login window appeared; I logged in and clicked "Allow".
This redirected me to the connection page in Power Apps.
In the custom connector, I clicked "Edit" → "Test" tab → "Test Operations".
 
Issue:
 
I am encountering multiple errors when testing the operation: 400 (Bad Request) - Missing Version 401 (Unauthorized) - Token Revoked 422 (Unprocessable Entity) 404 (Not Found) - Resource Not Found I’m unsure if this is related to incorrect OAuth settings, missing scopes, or API configuration. Could you please review and guide me on how to resolve these issues.
Regards,
Sathya Sai.
Categories:

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,756 Most Valuable Professional

Leaderboard

Featured topics