title: MVC5 Web app using ADFS On-Premises Organizational Auth and Visual Studio 2013 localhost development
body: <p>I am trying to create an MVC5 Web Application configured to use the On-Premises Organizational Authenticated Option (ADFS) as described <a href="http://www.cloudidentity.com/blog/2014/02/12/use-the-on-premises-organizational-authentication-option-adfs-with-asp-net-in-visual-studio-2013/" rel="nofollow">Here by Vittorio Bertocci</a></p>
  
  <p>First, I create new MVC project. Then I change the Authentication to On-Premises. Set the On-Premises Authority to my ADFS federation metadata Endpoint. I checked to make sure the federation metadata xml could be reached and it was. I leave the App ID URI field blank accepting the default value. I ve done both, provided a value and left blank.</p>
  
  <p>I then configured my relying party app manually. Setting the relying party WS-Federation Passive Protocol URL: to <code>https://localhost:44300</code> which was provided by Visual studio. This value is the only value given as the trust identifier. </p>
  
  <p>Lastly, I mapped 2 claim types for good measure; Display Name and User-Principal Name. All this provided by the example link.</p>
  
  <p>I then runit(F5) the ADFS login pops up with a generic error. I goto the ADFS server and find the following detailed error.</p>
  
  <p>Development Enviroment
  I have 3 servers and 1 client</p>
  
  <ul>
  <li>1 Domain Controller </li>
  <li>1 CA server</li>
  <li>1 ADFS</li>
  <li>1 windows 8 client.</li>
  </ul>
  
  <p>I keep receiving the following error message inside from ADFS</p>
  
  <pre><code>Encountered error during federation passive request. 
  
  Additional Data 
  
  Protocol Name: 
  wsfed 
  
  Relying Party: 
  https://localhost:44300/ 
  
  Exception details: 
  Microsoft.IdentityServer.Web.InvalidScopeException: MSIS7007: The requested relying party trust 'https://localhost:44300/' is unspecified or unsupported. If a relying party trust was specified, it is possible that you do not have permission to access the trust relying party. Contact your administrator for details.
     at Microsoft.IdentityServer.Web.Protocols.WSFederation.WSFederationSignInContext.Validate()
     at Microsoft.IdentityServer.Web.Protocols.WSFederation.WSFederationProtocolHandler.GetRequiredPipelineBehaviors(ProtocolContext pContext)
     at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)
  </code></pre>
  
  <p>Any help is appreciated.</p>