title: STS ,SAML and Java SDK Unable to load AWS credentials from any provider in the chain
body: <p>I am trying to get temp credentials for AWS from STS using a SAML requet(from ADFS).
  I have the SAML token, the role arn and principalARN. If I use this to login using AWS CLI they work. But using the same 3 with the Java SDK gives the following error.</p>
  
  <blockquote>
    <p>Unable to load AWS credentials from any provider in the chain</p>
  </blockquote>
  
  <p>Here is the Java code I am using. </p>
  
  <pre><code>AssumeRoleWithSAMLRequest samlreq =new AssumeRoleWithSAMLRequest().withPrincipalArn(principalARN).withRoleArn(roleARN).withSAMLAssertion(SAMLToken);
  
  AWSSecurityTokenServiceClient stsclient = new AWSSecurityTokenServiceClient();
  
  AssumeRoleWithSAMLResult tempcreds=stsclient.assumeRoleWithSAML(samlreq);
  </code></pre>
  
  <p>Any idea what I am doing wrong or missing?</p>
  
  <p>Here is the Stack trace:</p>
  
  <blockquote>
    <p>Exception in thread "main" com.amazonaws.AmazonClientException: Unable
    to load AWS credentials from any provider in the chain    at
    com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:117)
      at
    com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.invoke(AWSSecurityTokenServiceClient.java:1098)
      at
    com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.assumeRoleWithSAML(AWSSecurityTokenServiceClient.java:575)
      at App.main(App.java:83)</p>
  </blockquote>