Office 365 Single sign On

%3CLINGO-SUB%20id%3D%22lingo-sub-291532%22%20slang%3D%22en-US%22%3EOffice%20365%20Single%20sign%20On%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-291532%22%20slang%3D%22en-US%22%3E%3CDIV%3EI%20want%20to%20integrate%20single%20sign%20on(SSO)%20with%20Office%20365.I%20am%20using%20third%20party%20IDP%20GLUU.%20and%20Sync%20Adfs%20with%20with%20office365%20admin%20pannel.%20When%20i%20entered%20email%20in%20office365%20login%20then%20it%20is%20correctly%20redirected%20to%20gluu%20SignIn%20page%20then%20I%20entered%20username%20and%20password%20and%20got%20error%20%22%3CSTRONG%3EInvalidNameIDPolicy%3C%2FSTRONG%3E%22.%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EPlease%20find%26nbsp%3B%20saml%20request-%20response%3A-%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSTRONG%3ESAML%20Request%3A%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%3CAUTHNREQUEST%20id%3D%22%26quot%3B_099e3e23-d100-4c9b-afb1-29d7ee1e2019%26quot%3B%26lt%3B%2FDIV%22%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Version%3D%222.0%22%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20IssueInstant%3D%222018-11-22T08%3A32%3A34.061Z%22%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20xmlns%3Asamlp%3D%22urn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Aprotocol%22%26gt%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%3CISSUER%20xmlns%3D%22%26quot%3Burn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Aassertion%26quot%3B%22%3Eurn%3Afederation%3AMicrosoftOnline%3C%2FISSUER%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%3CNAMEIDPOLICY%20format%3D%22%26quot%3Burn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Anameid-format%3Apersistent%26quot%3B%22%3E%3C%2FNAMEIDPOLICY%3E%3C%2FDIV%3E%3C%2FAUTHNREQUEST%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSTRONG%3ESAML%20Response%3A%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%3C%2FDIV%3E%3CDIV%3E%3CRESPONSE%20destination%3D%22%26quot%3B%26lt%3BA%22%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2Flogin.srf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CA%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2Flogin.srf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Flogin.microsoftonline.com%2Flogin.srf%3C%2FA%3E%22%3C%2FRESPONSE%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BID%3D%22_164f7c5ac5cf38223372c1bd44ce603f%22%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BInResponseTo%3D%22_5e69eec0-50a8-474c-adac-b56b76c7856e%22%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BIssueInstant%3D%222018-11-22T05%3A11%3A17.888Z%22%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BVersion%3D%222.0%22%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3Bxmlns%3Asaml2p%3D%22urn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Aprotocol%22%26gt%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%3CISSUER%20saml2%3D%22%26quot%3Burn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Aassertion%26quot%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fcashnow.co.in%2Fidp%2Fshibboleth%26lt%3B%2Fsaml2%3AIssuer%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcashnow.co.in%2Fidp%2Fshibboleth%3C%2FA%3E%3C%2FISSUER%3E%26gt%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%3CSTATUS%3E%3C%2FSTATUS%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%3CSTATUSCODE%20value%3D%22%26quot%3Burn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Astatus%3ARequester%26quot%3B%22%3E%3C%2FSTATUSCODE%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3CSTATUSCODE%20value%3D%22%26quot%3Burn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Astatus%3AInvalidNameIDPolicy%26quot%3B%22%3E%3C%2FSTATUSCODE%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%3CSTATUSMESSAGE%3EAn%20error%20occurred.%3C%2FSTATUSMESSAGE%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%3C%2FDIV%3E%3CDIV%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EI%20know%20error%20is%26nbsp%3B%20%22urn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Astatus%3AInvalidNameIDPolicy%22.%3C%2FDIV%3E%3CDIV%3E%26nbsp%3BSo%20just%20want%20to%20know%20this%20error%20comes%20from%20ADFS%20side%20or%20IDP%20side%3F%3C%2FDIV%3E%3CDIV%3E%26nbsp%3BIf%20this%20error%20comes%20from%20ADFS%20side%20then%20how%20to%20resolve%20this%20issue%3F%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CLINGO-LABS%20id%3D%22lingo-labs-291532%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAuthentication%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-292050%22%20slang%3D%22en-US%22%3ERe%3A%20Office%20365%20Single%20sign%20On%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-292050%22%20slang%3D%22en-US%22%3EDear%20Adam%2C%3CBR%20%2F%3EI%20have%20tried%20your%20suggestion%20but%20same%20result%20and%20error.%3CBR%20%2F%3EI%20am%20using%20Gluu%20Idp.Please%20find%20doc%20for%20Integration%20Office365%20in%20Gluu.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgluu.org%2Fdocs%2Fce%2F3.1.3%2Fintegration%2Fsaas%2Foffice%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgluu.org%2Fdocs%2Fce%2F3.1.3%2Fintegration%2Fsaas%2Foffice%2F%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EIDP%20requires%20three%20attributes%20IDPEmail%2C%20ImmutableID%20and%20objectguid%3CBR%20%2F%3Eyou%20can%20find%20in%20doc%20that%20IDP%20requires%20nameID%20'ImmutableID'%20.This%20is%20a%20'persistent'%20type%20nameID%3B%20base%20attribute%20'objectguid'%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-291658%22%20slang%3D%22en-US%22%3ERe%3A%20Office%20365%20Single%20sign%20On%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-291658%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F246495%22%20target%3D%22_blank%22%3E%40scl-family_1%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20looks%20to%20me%20like%20the%20email%20address%20is%20not%20getting%20mapped%20properly%20to%20the%20username%20or%20%22nameID%22%20inside%20of%20your%20SAML%20application.%20Essentially%20something%20else%20is%20being%20tested%20against%20Office%20365%20from%20the%20IDP.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20fix%20this%2C%20I%20would%20look%20at%20creating%20a%20claims%20rule%20inside%20of%20ADFS%20to%20change%20the%20nameID%20to%20the%20email%20address%20for%20your%20users.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20article%20walks%20through%20the%20process%20of%20creating%20that%20claim.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fhelp.screensteps.com%2Fm%2Fremote_authentication%2Fl%2F841006-troubleshooting-saml-for-adfs%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fhelp.screensteps.com%2Fm%2Fremote_authentication%2Fl%2F841006-troubleshooting-saml-for-adfs%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20that%20is%20in%20place%2C%20I%20would%20expect%20you%20to%20resolve%20the%20error%20you%20are%20seeing.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAdam%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor
I want to integrate single sign on(SSO) with Office 365.I am using third party IDP GLUU. and Sync Adfs with with office365 admin pannel. When i entered email in office365 login then it is correctly redirected to gluu SignIn page then I entered username and password and got error "InvalidNameIDPolicy".
 
Please find  saml request- response:-
 
SAML Request:
<samlp:AuthnRequest ID="_099e3e23-d100-4c9b-afb1-29d7ee1e2019"
                    Version="2.0"
                    IssueInstant="2018-11-22T08:32:34.061Z"
                    xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
  <Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">urn:federation:MicrosoftOnline</Issuer>
  <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" /></samlp:AuthnRequest>
 
 
SAML Response:
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:Response Destination="https://login.microsoftonline.com/login.srf"
                 ID="_164f7c5ac5cf38223372c1bd44ce603f"
                 InResponseTo="_5e69eec0-50a8-474c-adac-b56b76c7856e"
                 IssueInstant="2018-11-22T05:11:17.888Z"
                 Version="2.0"
                 xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
  <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">https://cashnow.co.in/idp/shibboleth</saml2:Issuer>
  <saml2p:Status>
    <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Requester">
      <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy" /></saml2p:StatusCode>
    <saml2p:StatusMessage>An error occurred.</saml2p:StatusMessage>
  </saml2p:Status>
</saml2p:Response>
 
 
I know error is  "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy".
 So just want to know this error comes from ADFS side or IDP side?
 If this error comes from ADFS side then how to resolve this issue?
 
 
 
 
 
 
 
 
2 Replies
Highlighted

Hey @scl-family_1,

 

It looks to me like the email address is not getting mapped properly to the username or "nameID" inside of your SAML application. Essentially something else is being tested against Office 365 from the IDP.

 

To fix this, I would look at creating a claims rule inside of ADFS to change the nameID to the email address for your users.

 

This article walks through the process of creating that claim.

https://help.screensteps.com/m/remote_authentication/l/841006-troubleshooting-saml-for-adfs

 

Once that is in place, I would expect you to resolve the error you are seeing.

 

Adam

Highlighted
Dear Adam,
I have tried your suggestion but same result and error.
I am using Gluu Idp.Please find doc for Integration Office365 in Gluu.
https://gluu.org/docs/ce/3.1.3/integration/saas/office/

IDP requires three attributes IDPEmail, ImmutableID and objectguid
you can find in doc that IDP requires nameID 'ImmutableID' .This is a 'persistent' type nameID; base attribute 'objectguid'