Symptom
- You have created an OAuth Client in Datasphere and would like to use it in the CLI command
- You are facing issues with using the OAuth credentials in the CLI command
Environment
SAP Datasphere
Resolution
- Ensure that the Redirect URI is set to http://localhost:8080/ as mentioned in Create OAuth2.0 Clients to Authenticate Against SAP Datasphere ("Redirect URI")
- Run the command datasphere logout . This is to logout of any earlier logins which you may have done
- Run the command datasphere config cache clean to clear the cache
- Run the command datasphere config cache init --host https://<tenantname>.hanacloudservices.cloud.sap/ --authorization-url https://<tenant name>.authentication.sap.hana.ondemand.com/oauth/authorize --token-url https://<tenant name>/oauth/token --client-id "<client id>" --client-secret "<client secret>"
- After step 4 there will be a window open asking to login to your datasphere tenant
- Once you login you can close the window and then start using the command line commands. There is no need for the authorization code moving forward
See Also
Keywords
Command Line, Oauth, CLI, comand , KBA , DS-API-CLI , SAP Datasphere Command-Line Interface , How To
Product
SAP Datasphere 1.0