Web SSO-with-cloud-hell-Office365 users

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

+3
source share
1 answer

It seems that you have the correct information above, however, when you said that you "did not succeed," what that means. What really happens when you try to configure it and what really happens when the connection is down. To get accurate help, you need to add some error information.

Most of the problem I saw is related to getting / setting up the proper smart link, which is used in the web application to transfer users to O365 servers in order to receive a positive authentication request. Therefore, if you have passed this point, there should not be a problem, because, as soon as you have a complaint, you are an authenticated user. So you really need to use the Smart Links fix, and the problem is described below, so make sure you have the correct setting:

Use smart links or initialized IdP authentication with Office 365

Office 365 Single Sign-On configuration is done in conjunction with enterprise ADFS supported by WS-Federation (WS-Fed) and WS-Trust protocols, and Office 365 Single Sign-On white paper with AD FS 2.0 white papers here to explain the process. .

You can also take a look at SAML 2.0 protocol based on Internet2 Shibboleth 2 application-based protocol (Web), with Office 365 offering here .

+1
source

Source: https://habr.com/ru/post/955861/


All Articles