Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Feature: S2S user delegation in Hightrust app scenario #2363

Merged
merged 4 commits into from
Oct 4, 2019
Merged

Feature: S2S user delegation in Hightrust app scenario #2363

merged 4 commits into from
Oct 4, 2019

Conversation

tmeckel
Copy link
Contributor

@tmeckel tmeckel commented Aug 19, 2019

Q A
Bug fix? no
New feature? yes
New sample? no
Related issues? n/a

What's in this Pull Request?

This PR contains an enhancement whith which it's possible to create an App Delegation token in an Hightrust configuration to act as specific user (behalf-of) within a SharePoint connection. Up to now this scenario was only possible with an WindowsIdentity object instance available, which is not the case if the addin is deployed in an environment which isn't connected to an Active Directory environment (e.g. Azue WebApp) and is employing other authentication themes like JWT Bearer or SAML tokens.

This PR now provides new methods on Core/OfficeDevPnP.Core/AuthenticationManager.cs which allows to pass the SID or the UPN for an user for creating an impersonation (delegation) token. The SID is just as unavailable in the above scenario as the WindowsIdentity object instance but the UPN typically is, because the UPN is normally used in JWT or SAML token to identify an incoming user.

With this extension it is possible to host a SharePoint Add in a "domain-less" environment, like as an Azure WebApp, utilize modern authentication methods and still perform impersonation on a SharePoint system in an Active Directory domain.

@tmeckel tmeckel changed the title S2S user delegation in Hightrust app scenario Feature: S2S user delegation in Hightrust app scenario Aug 19, 2019
jansenbe added a commit that referenced this pull request Oct 4, 2019
@jansenbe jansenbe merged commit 8b21b0c into pnp:dev Oct 4, 2019
@jansenbe
Copy link
Contributor

jansenbe commented Oct 4, 2019

Thanks @tmeckel. Just merged this one, did revert the public method rename you did to avoid breaking folks that were already using this.

@tmeckel
Copy link
Contributor Author

tmeckel commented Oct 4, 2019

Thanks @tmeckel. Just merged this one, did revert the public method rename you did to avoid breaking folks that were already using this.

@jansenbe Thanks for merging my PR and spotting the breaking change and reverting it!

@tmeckel tmeckel deleted the s2s-delegation branch October 8, 2019 12:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants