Home

How can I auto-logged an user inside a Sharepoint Web Part?

%3CLINGO-SUB%20id%3D%22lingo-sub-1249180%22%20slang%3D%22es-ES%22%3EHow%20can%20I%20auto-logged%20an%20user%20inside%20a%20Sharepoint%20Web%20Part%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1249180%22%20slang%3D%22es-ES%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22diagram.jpg%22%20style%3D%22width%3A%20671px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F179112i115CD49B9E29E0FF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22diagram.jpg%22%20alt%3D%22diagram.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20website%20%22Play%20web%22.%20When%20I%20want%20to%20access%20into%20this%20site%20I%20have%20to%20login%20previously%20with%20user%2Fpass.%20An%20authtentication%20module%2C%20handle%20this%20info%20and%20starts%20a%20communication%20with%20an%20Azure%20AD.%20If%20the%20user%20is%20validated%20properly%20using%20a%20callback%20the%20control%20is%20returned%20to%20the%20Play%20Web%20with%20the%20user%20logged.%20All%20these%20steps%20works%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%20is%20the%20problem%3F.%20One%20of%20our%20clients%20wants%20to%20embed%20this%20%22Play%20web%22%20inside%20his%20Sharepoint%20but%20he%20doesn't%20want%20relogin.%20He%20needs%20to%20use%20the%20Sharepoint%20context%20to%20autologged%20the%20user%20into%20the%20website.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20to%20do%20this%3F%2C%20Should%20have%20I%20setup%20something%20in%20Azure%20AD%3A%20Proxy%2C%20Function%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20stuck%20with%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1249180%22%20slang%3D%22es-ES%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFunction%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EProxy%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharepoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1313853%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20auto-logged%20an%20user%20inside%20a%20Sharepoint%20Web%20Part%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1313853%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F535940%22%20target%3D%22_blank%22%3E%40vcima%3C%2FA%3E%26nbsp%3BWhich%20entity%20is%20the%20identity%20provider%20for%20your%20app%20as%20of%20now.%3CBR%20%2F%3EIf%20it%20is%20not%20Azure%20AD%2C%20then%20Add%20azure%20AD%20as%20an%20identity%20provider%20for%20the%20application.%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20soon%20as%20your%20app%20will%20initiate%20the%20sign%20in%20request%2C%20user%20will%20experience%20SSO%2C%20provided%20your%20customer%20is%20using%20sharepoint%20online.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

diagram.jpg

 

I have a website "Play web". When I want to access into this site I have to login previously with user/pass. An authtentication module, handle this info and starts a communication with an Azure AD. If the user is validated properly using a callback the control is returned to the Play Web with the user logged. All these steps works fine.

 

Where is the problem?. One of our clients wants to embed this "Play web" inside his Sharepoint but he doesn't want relogin. He needs to use the Sharepoint context to autologged the user into the website.  

 

Is there any way to do this?,  Should have I setup something in Azure AD: Proxy, Function?

 

I'm stuck with this.

 

Regards

1 Reply
Highlighted

@vcima Which entity is the identity provider for your app as of now.
If it is not Azure AD, then Add azure AD as an identity provider for the application. 

As soon as your app will initiate the sign in request, user will experience SSO, provided your customer is using sharepoint online.