none
Provider Hosted App cannot create client context with ADFS user RRS feed

  • Question

  • Hi,

    I am developing a SharePoint 2013 Provider Hosted App with ADFS built on asp.net mvc 5. The app is calling any controller method twice. During debugging I found in SharePointContextFilterAttribute.cs class the "OnActionExecuting" method executes "case RedirectionStatus.ShouldRedirect" instead of "case RedirectionStatus.Ok".

    I don't know if it is related, when I try to send email to any ADFS user through Utility.SendEmail, the system returns 403 forbidden error.

    Could anybody please help me to fix it?

    Thanks.


    Monday, July 16, 2018 5:55 PM

Answers

All replies

  • Hi,

    Please check the article below to create the add-in.

    SharePoint 2013 with SAML Claims and SharePoint Hosted Apps

    http://www.wictorwilen.se/sharepoint-2013-with-saml-claims-and-provider-hosted-apps

    And use SAML Extensions for the SharePoint App Context helper in the add-in.

    https://github.com/wictorwilen/SharePointContextSaml

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Marked as answer by pointtoshare Friday, August 3, 2018 7:11 AM
    Tuesday, July 17, 2018 9:54 AM
    Moderator
  • Hi Dennis,

    I followed your shared articles, all setup is done properly. The app is based on SAML claims.

    Anonymous Authentication and Windows Authentication both are enabled in the app web. Should it be any reason behind the issues?

    This below code for user roles is not working also.

    <roleManager cacheRolesInCookie="true" defaultProvider="UserRoleProvider" enabled="true">
          <providers>
            <clear />
            <add name="UserRoleProvider" type="ProductAppWeb.Models.UserRoleProvider" />
          </providers>
        </roleManager>
        <authorization>
          <deny users="?" />
        </authorization>

    Any idea? 

    Thanks.

    Wednesday, July 18, 2018 5:54 PM
  • Hi,

    Did you use SAML Extensions for the SharePoint App Context helper in the add-in?

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, July 20, 2018 10:05 AM
    Moderator