cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Silver layer to Salesforce - Need Help Debugging - IllegalArgumentException: Secret does not exist

ManojkMohan
Contributor III
  1. I have ingested raw data 
  2. Converted into Bronze Table
  3. Subsequently have saved the DataFrame as a Delta table in the 'silver' schema

AS part of sending data from silvertable to salesforce

  1. Install & authenticate the Databricks CLI - Done
  2. Create the secret scope - Done
  3. Add secrets into the scope - Suspecting error here
  4. Verify scope and secrets - DoneManojkMohan_0-1755889455988.png5. Load secrets securely in a notebook
  5. ManojkMohan_1-1755889481679.png
  6. Build a JWT for Salesforce Oauth

The below script is performing  fcrucial part of the Salesforce OAuth 2.0 JWT Bearer Flow. Its main goal is to create a secure, signed JSON Web Token (JWT) that can be used to prove the application's identity to Salesforce without using a password. 

ManojkMohan_2-1755889722106.png

IllegalArgumentException: Secret does not exist with scope: salesforce and key: sf_private_key 

 

Need help debugging

1 ACCEPTED SOLUTION

Accepted Solutions

ManojkMohan
Contributor III

@szymon_dybczak  Resolved it now it 

I had to use commands specific to Databricks CLI v0.265.0 

ManojkMohan_0-1756302010191.png

 

View solution in original post

3 REPLIES 3

ManojkMohan
Contributor III

to add

ManojkMohan_0-1755895542352.png

Variables have been set successfully. Consumer Key starts with: 3MVG9rZjd7MXFdL... Salesforce Username: manoj.km372@agentforce.com , private key alone giving error - IllegalArgumentException: Secret does not exist with scope: salesforce and key: sf_private_key . C:\Users\manoj.km\Downloads>server.key opens the note pad file successfully

szymon_dybczak
Esteemed Contributor III

Hi @ManojkMohan ,

Could you send as a command that you used to put secret to a scope for this following key sf_private_key?

Something went wrong with putting this particular key to a scope. You will only get this error if there's no such a key in a scope.

Anyway, you can try once again to add that key to a scope but this time attach --debug flag to a command

databricks secrets put-secret salesforce sf_private_key_test --debug

szymon_dybczak_0-1755939783492.png

 

ManojkMohan
Contributor III

@szymon_dybczak  Resolved it now it 

I had to use commands specific to Databricks CLI v0.265.0 

ManojkMohan_0-1756302010191.png

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now