From 14f0c99210a5ba94a60e45d12ec69fe71894524c Mon Sep 17 00:00:00 2001 From: Zach Leventer Date: Fri, 24 Apr 2026 09:23:16 -0400 Subject: [PATCH] Update deprecated OAuth scopes and stale docs URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - config.properties: replace r_emailaddress, r_liteprofile, rw_ads, rw_organization_admin (all deprecated) with current OpenID Connect scopes: openid, profile, email, w_member_social - LinkedInMarketingController.java: update Marketing API scope comment (rw_ads → r_ads, w_ads) and fix docs.microsoft.com URLs to learn.microsoft.com (the current canonical domain) Fixes: deprecated scopes cause an authorization error on the OAuth consent screen; see https://i.imgur.com/Nfz0u2y.png --- .../java/com/example/api/LinkedInMarketingController.java | 6 +++--- server/src/main/resources/config.properties | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/com/example/api/LinkedInMarketingController.java b/server/src/main/java/com/example/api/LinkedInMarketingController.java index adcb83f..a839076 100644 --- a/server/src/main/java/com/example/api/LinkedInMarketingController.java +++ b/server/src/main/java/com/example/api/LinkedInMarketingController.java @@ -20,11 +20,11 @@ /* * Getting Started with LinkedIn's Marketing APIs , - * Documentation: https://docs.microsoft.com/en-us/linkedin/marketing/getting-started + * Documentation: https://learn.microsoft.com/en-us/linkedin/marketing/getting-started * The additional scopes required to use these functions are: - * 'rw_ads, rw_organization_admin' + * 'r_ads, w_ads' (replaces deprecated 'rw_ads, rw_organization_admin') * You can invoke these functions independently with valid access token string as a parameter. - * More Docs: https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-account-users + * More Docs: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-account-users */ @RestController diff --git a/server/src/main/resources/config.properties b/server/src/main/resources/config.properties index 7225999..6e30e19 100644 --- a/server/src/main/resources/config.properties +++ b/server/src/main/resources/config.properties @@ -6,7 +6,7 @@ clientSecret= # Replace the below with the URL to direct the after successful authorization code generation(set in your developer application) redirectUri=http://localhost:8080/login #Replace with desired scopes -scope=r_emailaddress,r_liteprofile,rw_ads,rw_organization_admin +scope=openid,profile,email,w_member_social #REST based client-component URL client_url=http://localhost:8989/