Exception: System.Net.WebException: the remote server returned an error: (401) Unauthorized."

This is the error I receive when attempting to issue the command "New-SPTrustedSecurityTokenIssuer –Name "crm" –IsTrustBroker:$false –MetadataEndpoint internalcrm.domain.com/.../json" in order to enable Server-Based SharePoint Integration.