What is the best solution for deploying web-sso-cloud-ad-o365 users in a .net application? I studied and found several solutions, but I am not very convinced of these solutions.
I am creating an ASP.NET web application on windows. Azure.Application Username and password are the same as Office 365 with Windows Identity Foundation.
Is it possible to establish a single sign between my application and the Office365 environment? Therefore, the user needs to log in to Office365 after logging into my application.
I tried the link below and made the MVC3 web application.
https://www.windowsazure.com/en-us/develop/net/how-to-guides/web-sso/
http://veerendracloudblogs.blogspot.in/2012/07/web-sso-with-cloud-ad-o365-users.html
when I run the application and provide credentials to log in to the Error Occur system: -
Server error in application "/".
ID1038: AudienceRestrictionCondition is invalid because the specified audience is not in AudienceUris. Audience: 'spn: b6933382-49c5-4430-81cc-36dd50a3c971'
Description: An unhandled exception occurred during the execution of the current web request. Check the stack trace for more information about the error and where it appeared in the code.
Exception Details: Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException: ID1038: AudienceRestrictionCondition is invalid because the specified audience is not in AudienceUris. Audience: 'spn: b6933382-49c5-4430-81cc-36dd50a3c971'
Source Error:
An unhandled exception was thrown during the execution of the current web request. Information about the origin and location of the exception can be identified using the exception stack trace below.
Stack trace:
[AudienceUriValidationFailedException: ID1038: AudienceRestrictionCondition is invalid because the specified audience is not in AudienceUris. Audience: 'spn: b6933382-49c5-4430-81cc-36dd50a3c971'] Microsoft.IdentityModel.Tokens.SamlSecurityTokenRequirement.ValidateAudienceRestriction (IList 1 allowedAudienceUris, IList IListlemitlementity tokenAudience) +1287 Microsoft.IlmitityTentityToken , Boolean enforceAudienceRestriction) +2309 Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityTokenHandler.ValidateToken (SecurityToken token) +786 Microsoft.IdentityModel.Tokens.SecurityTokenHendlerCollection.ValidateTokenItent.TokenMenToken.TokenTokenMenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTec , Boolean provides a BearerToken, String endpointUri) +279 Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage (HttpRequest request) +822 Microsoft.IdentityModel.Web.WSFederationAuthenticationMentule.Outment.modifier.odicate.Odentify.odicate EventArgs) +363 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () +136 System.Web.HttpApplication.ExecuteStep (step IExecutionStep, Boolean & completed synchronously) +69