SoapFault: INVALID_SESSION_ID when describing metadata
Whenever I try to create a new project, I can successfully validate the connection to salesforce. Still, when trying to describe or retrieve the metadata I get the following error:
Comments (9)
-
repo owner -
reporter Hi Scott, thanks for your quick answer. I am using username/pswd & token directly into IC2.
-
repo owner Okay. I have two recommendations. First, just in case there's some retention of an older session ID when this call is made--and I don't know why that would, but let's assume it could be for the moment--please restart the IDE process and see if the same issue holds. Assuming it does, it may be an instance of an issue I've seen perhaps 2-3 times over the past few years where the Salesforce API returns a session ID from a call to the
login
API that it then doesn't recognize on subsequent calls. I think that Salesforce said it may have something to do with session consistency across clustered servers, but it's been a very long time since the topic was discussed. What you might try in that case is switching from a native connection to an OAuth connection:Note that while this requires the Salesforce CLI, it does not in any way require you to use any other aspect of Salesforce DX for your project. It just allows IC2 to delegate to the Salesforce CLI to create and maintain an OAuth access token to be used as its session ID.
Please let me know if those suggestions don't help to resolve the issue for you, and I'll be curious to know which does provide resolution if so if you don't mind.
-
reporter I already uninstalled and reinstalled intellij and illuminated cloud a couple of times, didn’t make any difference. The actual login works fine, but immediately after success message I get the session id error. Also, I’ve tried retrieving with VS code and it works fine.
I have tried to Authorize the org through Oauth connection, but that doesn’t seem to be available outside of SFDX, which I am not familiar with.
-
repo owner VS Code is using an OAuth connection, so that's a good sign that switching to one will help with IC2. You must configure IC2 for the Salesforce CLI to be able to work with OAuth connections:
-
repo owner Hi. Anything new to report on this? Were you able to get OAuth connections going and did they resolve the issue for you?
-
reporter Hi Scott, the issue was resolved after using an OAuth connection. Thanks for the support!
-
repo owner - changed status to resolved
Okay, wonderful. Thanks for letting me know.
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment
Hi. What type of connection is being used? Native (where you enter your username/password/token directly into IC2)? OAuth? If the former, was MFA (multi-factor authentication) enabled for the connection user? If the latter, can you please verify that you have the latest version of the Salesforce CLI installed?
Let's start with those questions and I imagine I'll have others when I have the answers to them.