Skip to main content TDX, the developer conference for the AI agent era is happening now. Watch live on Salesforce+ for exclusive digital content, a revolutionary keynote, and more.

Hi When saving the Named Credentials record I get error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

 The URL is set as described in "The domain from the callback URL that shows in the authentication provider. For example, if the callback URL is https://www.example.com/services/authcallback/PermhelperAuth, then the domain is https://www.example.com."

6 answers
  1. Jul 21, 2022, 7:54 AM

    Hi Allan, 

     

    After creating/updating the connected app, salesforce takes up to 10 minutes to reflect the change, after that time you can configure the named credentials.

     

    Your error is for Mismatch URI which means Callback URL wasn't added in the connected app for which you are using Client ID and Secret, if added then you have to wait for few minutes. 

  2. May 13, 2024, 2:57 AM
    1. Make sure that Callback URL from Auth Provider is copied into connected app Callback URL.
    2. Make sure that connected app consumer key & Consumer Secret are copied into your Auth Provider consumer key & Consumer Secret fields
    3. In the Named Credential Url put Current My Domain URL Note:which can be found under setup=> My Domain (directly search My Domain in quick find ) => Current My Domain URL ( just prefix this url with https:// and add this in Named Credential Url field ). click save.

    you will be redirected to login page. where you have to provide username ,password of user (generally integration/api user).

    Basically that means whenever you perform API Callout using this Named credential then record will be modified/created by this user.

  3. Jul 21, 2022, 8:02 AM

    Sorry - forgot the step where I was to update the callback URL in the Conneced App

  4. Oct 6, 2024, 6:54 AM

    I was facing this error from past few hours and was trying to find solution. it was very frustrating. finally i was able to fix this. 

     

    Under Connected App, OAuth i gave this permission.

    Manage user data via Web browsers (web)

    Full access (full)

    Perform requests at any time (refresh_token, offline_access)

     

    And Enabled : Enable Client Credentials Flow

     

    Now in Postman i used below URLs

     

    Auth URL - https://login.salesforce.com/services/oauth2/authorize

     

    Access Token URL - https://xxxxxxxx-dev-ed.my.salesforce.com/services/oauth2/token

     

    <<Replace with your custom URL>>

     

    Code challenge Method - HSA

    Client Auth - Send client credential in Body

     

    Hope this will fix the error. 

  5. Jul 21, 2022, 8:05 AM

    Lightning 

    From Setup, enter App in the Quick Find box, then select App Manager.

     

    Classic

    Setup | Apps | Click on your connected App

     

    Then Click on Edit and fill the value in Callback URL field.

0/9000