Questions tagged [auth-provider]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Is it possible to set up a Microsoft Auth. Provider without a Callback URL?

I'm writing a feature that uses an API implemented on top of the Microsoft/Azure stack. To access the service, I'm first required to fetch an OAuth2.0 token. URL to get the token: https://login....
0 votes
1 answer
42 views

How to use AuthProviderPluginClass in managed package?

I am trying to create custom Auth. Provider for my managed package. Class extending Auth.AuthProviderPluginClass works well in namespaced scratch org, but when packaged and installed in sandbox I am ...
0 votes
1 answer
96 views

Using Azure as Auth. Provider with Named Credential

I'm building an integration to a service that is protected by Azure OAuth. I've set up an registered app that I've been able to use to fetch a valid accesstoken to the Service with the following code: ...
  • 71
0 votes
0 answers
47 views

Auth Provider with Microsoft getting 401

I'm trying to create an integration between Salesforce and Microsoft Graph, for getting calendar events. I've set the auth.provider, namedCredential and External credential. I also have the proper ...
2 votes
1 answer
146 views

Package partially configured NamedCredential and AuthProvider

Creating Auth Providers and Named Credentials for an installed Managed Package is not a simple process. Most Subscriber Admins are overwhelmed by the settings. For that reason, many AppExchange ...
0 votes
1 answer
116 views

Integration between 2 salesforce orgs is being established when provided with wrong credentials

I wonder about the Salesforce orgs connection happening between 2 salesforce environments. The general norm: Create a connected app in the target org and generate the consumer key and consumer secret ...
1 vote
1 answer
118 views

Auth Provider with a Google account: redirect the user after they log in [duplicate]

I have setup SSO for an experience cloud site, I selected Google for the SSO and did not specify the authentication URLs and consumer key/secret. The SSO works fine, what I want to do is redirect the ...
  • 11
2 votes
0 answers
166 views

OAuth2 bearer token is not being saved in Named Credential and cannot use {!$Credential.OAuthToken}

I am trying to create an LWC that takes in 2 addresses from the UI and uses Fedex's Rates API to get the estimated cost. I have the "Token Endpoint URL" but the API docs but it does not ...
  • 273
1 vote
1 answer
320 views

Dynamic redirect URL after logout from Experience Cloud

The setup for my issue happens in a digital experience. We use an external SSO System to provide credentials, so Salesforce is the relying Party. What I want to achieve is, that after the Person logs ...
0 votes
0 answers
47 views

How to logout of Auth0 [duplicate]

have a requirement to have a visualforce page with login and logout buttons. When a user clicks login they are redirected to the external App through Auth0 to login and if the user is found in ...
  • 73
1 vote
1 answer
670 views

Login into Salesforce community from external website using openid connect

I need to create a link/button to login to salesforce community from external web application. My requirement is external web app needs to be the IDP and OpenId connect should be used as provider type....
0 votes
0 answers
102 views

Open ID Connect Auth. Provider - obtaining the cookies

My requirement is to access external (non-SF) system, which has additional authentication layer in Microsoft Azure AD. When using curl or Postman in general, I'm performing 3 requests: Oauth 2.0 : ...
  • 53
0 votes
0 answers
311 views

Calling an API hosted by MS Azure

On the Azure Portal console we have registered an application through the App Registration page. The app has a client credential with 1 secret. We have created a custom scope, called custom.scope. We ...
0 votes
0 answers
97 views

SSO Stops working when enabling Basic Authentication in Customer Community

We have a working SSO (auth provider) Authentication in one of our Customer Communities. We enabled the Basic Authentication in addition to SSO. But while enabling this setting from All Sites > ...
1 vote
0 answers
43 views

Oauth KickoffUrls empty in OpenId AuthProviders

I am creating an AuthProvider for an external API using Apex and SOAP API private void createAuthProvider() { createSObject( '<urn1:type>AuthProvider</urn1:type>' + '&...
2 votes
0 answers
316 views

How to implement PKCE flow in custom external authentication provider?

Objective is to implement PKCE (proof key for code exchange ) verification as part of SSO with an external identity provider and Salesforce Experience Cloud Tried so far: Setup a custom Auth. ...
  • 3,827
1 vote
0 answers
644 views

Setup the Name Credential and Auth Provider for Marketing Cloud API

We are intent to use Marketing Cloud API using Apex Callout. Initially, I was trying to set up a Name Credential and Auth Provider for the Server-Server API Package on the MC side. But with my testing,...
0 votes
1 answer
165 views

Fetch Auth. Provider Callback URL in Flows

I have successfully created Auth. Provider from my ScreenFlow. I want to display the callback URL in the same flow. Can someone please tell me whether there is any way to fetch the Callback URL of a ...
-1 votes
2 answers
488 views

How to resolve "You can’t delete this auth provider as an authentication method because your org or Experience Cloud site is currently using it"?

How can Auth. Providers be removed from Experience Cloud sites? When I attempt to delete my OpenID Auth. Provider in my Sandbox, I am receiving the following error: You can’t delete this auth ...
1 vote
0 answers
608 views

Salesforce Marketing cloud rest API from Salesforce Cloud (apex)

I'm trying do set Auth. Providers and Named Credential for the salesforce marketing cloud in order to be able to make callout from apex without worrying to get and refresh the token. Is there any ...
  • 11
0 votes
1 answer
620 views

Custom auth provider - how to get a new access token without a refresh token

I have to integrate Salesforce with an external app using OAuth2.0. I create Auth. Provider and Named Credential, authenticated successfully too. But I'm getting one issue with Named Credential : The ...
0 votes
0 answers
410 views

Named Credentials with Authorization Protocol OAuth 2.0 vs authorization and authentication handled using apex

Could anyone please clarify my doubts. If I use Authentication Protocol as Oauth 2.0 and provide an Authentication Provider for the same with required settings and call a rest end point of different ...
0 votes
1 answer
838 views

Setting up MyTrailHead subdomain results in Auth Provider error No_OAuth_Token

I am trying to set up a MyTrailhead subdomain on a sandbox org as mentioned here: https://help.salesforce.com/s/articleView?id=sf.mth_set_up_your_mth_subdomain_and_namespace.htm&type=5 My user is ...
0 votes
1 answer
519 views

OpenID Connect AWS Cognito - ERROR: No_OpenId_Response

Overview Currently using AWS Cognito User Pools as Identity Provider using OpenID Connect for logging in a Salesforce Community. I'm currently getting a similar issue with this post OpenID Connect - ...
  • 1,099
1 vote
0 answers
90 views

Custom Auth provider - pass data to `getUserInfo` from `handleCallback`

I have a custom Auth Provider used by Connected App where the data that salesforce expects to be returned in the getUserInfo method is actually sent along with the OAUTH2 state (that data is coming ...
  • 1,791
1 vote
0 answers
148 views

Setting up Auth Provider with SSO

I am calling a REST API using Auth provider and Named credential, but the client wants to use their IDP SSO instead of using API credentials. Is there a way we can configure an SSO with Auth Provider ...
0 votes
1 answer
215 views

Auth Provider Callback masking ErrorDescription

we have Azure as Auth Provider for our community users. For some reason whenever Auth flow is interrupted in Azure, SF masks result in callback call and error_description is removed. Because of this, ...
  • 173
0 votes
0 answers
112 views

Named credential using OpenId Auth Provider

Is it possible to setup Named Credentials for following type of OAuth provider? I tried configuration named credential and Auth Provider (using OpenId) but unable to authenticate successfully. "...
  • 721
0 votes
1 answer
702 views

In need of assistance with writing a Registration Handler Test Class

I am in need of assistance here. Trying to implement a Registration Handler test class for production deployment, I don't seem to get the test class working, nor do I really know how to write tests. ...
2 votes
0 answers
493 views

Salesforce to Azure AD named credential failing after access token expires

Sf azure:Refresh token exchange to renew access token process (not working) I am facing an issue where I have a named credential configured in Salesforce using auth provider (using openid connect for ...
0 votes
0 answers
770 views

Decode Access and ID token recieved from 3rd party system in Salesforce Apex

We receive access token in Salesforce apex from 3rd party system (AWS Cognito) using a custom Auth. provider. I need to inspect the access and Id token to make sure that the tokens are valid and have ...
  • 21
0 votes
2 answers
3k views

Named Credential shows Authentication Status Pending even after successful authentication

I am trying to setup oAuth between salesforce and Workday. I created a Auth provider and a named credential as shown in the screenshots. Named credential] Auth Provider I checked 'Start ...
0 votes
0 answers
419 views

How does stateToPropagate work when extending Auth.AuthProviderPluginClass

I have created an apex class that extends the Auth.AuthProviderPluginClass. Everything is working but I have a requirement to pass "language":"fr" or "language":"en&...
2 votes
0 answers
507 views

Help setting up Marketing Cloud REST API as an External Service in Salesforce

I'm want to use External Services in salesforce to call the Marketing Cloud REST API in a flow. I've done some digging on this and think the steps to do this are: Setup an Auth Provider Setup and ...
  • 785
12 votes
1 answer
3k views

Custom REST controller to access Auth.AuthToken.getAccessToken returning null

Following on from a previous question: How to access OAuth Token stored in NamedCredential using Apex for use in other third party application I've created a custom REST endpoint which proxies ...
  • 8,788
1 vote
1 answer
867 views

How to access OAuth Token stored in NamedCredential using Apex for use in other third party application

I'd like to use the native Salesforce Auth. Provider and Named Credential capabilities to allow a Salesforce user to follow the OAuth flow to authenticate against a 3rd party service, and then later ...
  • 8,788
0 votes
0 answers
111 views

Custom Merge Field Named Credential Apex

I am integrating with GoToWebinar using a Named Credential to make Apex Callouts. While the Authentication piece is working well, during the Callback to get the access token, there are some additional ...
6 votes
1 answer
786 views

Why can't we package custom AuthProvider in Managed Package

My Managed Package app connects to an external REST API. This API uses OAuth2. For easy connectivity, I planned on packaging a custom AuthProvider with all the app-specific settings like URLs and ...
1 vote
1 answer
1k views

How does a Named Credential with a custom Auth. Provider check token validity?

When using a custom OAuth 2.0 provider as an extension of AuthProviderPluginClass for a Named Credential how does Salesforce check whether the current token is valid before attempting to request a new ...
  • 3,866
13 votes
0 answers
707 views

Manually Invoke Refresh on Custom AuthProviderPluginClass

I have recently implemented a custom auth plugin provider in hopes of getting away from making a token call with every request OR having to manage the token myself. I am using the Oauth 2.0 client ...
  • 1,959
0 votes
1 answer
120 views

AuthToken using Open Id Connect

We use a third party provider for SSO using OpenId Connect. We use the accessToken for the logged in user when making API calls for user session validation. When we do an Auth.AuthToken.getAccessToken(...
2 votes
1 answer
1k views

Problem passing error from Auth.RegistrationHandler

I’m creating a new community without self registration. My goal is to have users who already have a specified profile be able to login using LinkedIn as an Authentication provider. I’ve got ...
  • 75
3 votes
3 answers
2k views

How to integrate JIRA with salesforce using OAuth 2.0 [closed]

I am banging my head against the wall from the last couple of weeks to just set up the authentication between JIRA cloud and salesforce, I didn't get any proper documentation to create a connected ...
  • 2,467
3 votes
1 answer
410 views

Adding extra parameters to Auth Provider URLs

Is it possible to add extra parameters to the auto generated SF URLs in Auth. Provider? To be more clear, here's an example: We have an Auth. Provider with an auto generated URL(let's say https://...
  • 5,176
3 votes
0 answers
624 views

Debugging AuthProvider

I am now working on an implementation of an external authentication for SF. I am following this guide and so far I was able to define and set up the initiate() method and redirect to the correct URL. ...
  • 5,176
1 vote
1 answer
474 views

Salesforce internal server error - SSO through OAuth 2.0 external provider

I am configuring Single Sign On for my application through OAuth 2.0 server. I used the next recommendations: https://help.salesforce.com/articleView?id=sso_provider_plugin_custom.htm&type=5#...
0 votes
1 answer
441 views

External Services, Named Credentials, and Google Identity Aware Proxy (IAP)

I have a Swagger/OpenAPI API running on Google App Engine behind Google's Identity Aware Proxy. I can hit the URLs directly, which causes a normal authentication flow and authenticates me using my ...
2 votes
2 answers
323 views

Can we delete authProvider from APEX

I am trying to delete an authProvider from APEX. authProvider provider = [SELECT Id FROM authProvider WHERE DeveloperName = 'a_known_string']; delete provider; I get an error that states DML ...
5 votes
1 answer
3k views

Authorize Apex Rest API call using an Azure token

I'm new to the OAuth concept in Salesforce and looking for some pointers for my use-case. I'm not even sure if I'm framing my question correctly, but I'm trying to understand if I can invoke an Apex ...
5 votes
1 answer
338 views

"Decryption Exception" errors on Named Credential

I have callouts that use a Named Credential and a Custom Oauth2 Auth Provider fail with this error response: Invalid parameter value "[hidden]" for parameter "Decryption Exception" A similar ...