Home
%3CLINGO-SUB%20id%3D%22lingo-sub-621482%22%20slang%3D%22en-US%22%3ESFB%20online%20Client%20Sign%20in%20and%20Authentication%20Deep%20Dive%20%3BPart%207%20(Hybrid)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-621482%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20TECHNET%20on%20Apr%2013%2C%202018%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20Scenario%3A%20%3C%2FSTRONG%3E%20SFB%20Hybrid%20environment%2C%20SFB%20user%20is%20homed%20Online%2C%20ADFS%20is%20Configured%2C%20MA%20(Modern%20Auth)%20is%20enabled%20ON%20premise%20through%20On%20premise%20AD%20(NOT%20Hybrid%20MA%20EVOSTS)%20and%20also%20enabled%20in%20O365%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20%3CSPAN%20style%3D%22color%3A%20%23ff0000%22%3E%20NOTE%3A%20%3C%2FSPAN%3E%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20I%20have%20tried%20my%20best%20to%20ensure%20the%20information%20below%20is%20accurate.%20Some%20of%20the%20terms%20I%20use%20to%20describe%20things%20like%20Modern%20Auth%20provider%2C%20O365%20AD%2C%20Org%20ID%20etc.%20may%20not%20be%20standard%20terminology%2C%20I%20use%20them%20solely%20to%20make%20the%20understanding%20simpler.%20My%20intention%20here%20is%20to%20explain%20what%20happens%20in%20the%20background%20when%20a%20SFB%20client%20signs%20in%20so%20that%20it%20helps%20engineers%20and%20customers%20troubleshooting%20issues%20related%20to%20Sign%20in%20and%20Authentication.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3EHow%20Does%20it%20Work%3F%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20Below%20is%20a%20High%20level%20explanation%20on%20how%20the%20SFB%20online%20Client%20Sign%20in%20process%20works%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20SIP%20URI%20of%20the%20user%20-%20ex3%40cloudsfb.com%20%3CBR%20%2F%3E%3COL%3E%3CBR%20%2F%3E%3CLI%3ESFB%20client%20Queries%20DNS%20for%20Lyncdiscover.domain.com.%20This%20should%20point%20to%20External%20web%20services%20URL%20(ON%20Premise%20Reverse%20Proxy)%20which%20in%20this%20case%20is%20webext.cloudsfb.com%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESFB%20Client%20then%20sends%20a%20unauthenticated%20GET%20request%20to%20Lyncdiscover.domain.com%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20is%20then%20redirected%20to%20Autodiscover%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESFB%20Client%20then%20sends%20a%20Request%20to%20Autodiscover%20to%20discover%20its%20pool%20for%20sign%20in.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20is%20then%20challenged%20and%20is%20provided%20the%20URL%20for%20Webticket%20service%20where%20it%20can%20request%20a%20Webticket%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20then%20sends%20a%20POST%20request%20to%20Webticket%20Service%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EWebticket%20Service%20Redirects%20the%20Client%20to%20ON%20PREM%20Modern%20Auth%20Provider%20(%20%3CA%20href%3D%22https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%20%3C%2FA%3E%20)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ENow%20in%20order%20to%20authenticate%20the%20client%20reaches%20out%20to%20%3CA%20href%3D%22https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%20%3C%2FA%3E%20and%20requests%20a%20Token%2C%20The%20intention%20here%20is%20to%20Get%20a%20Token%20from%20%3CA%20href%3D%22https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20may%20receive%20a%20Password%20prompt%20(or%20previously%20saved%20password%20from%20credential%20manager%20is%20passed)%20and%20once%20the%20correct%20password%20is%20provided%2C%20%3CA%20href%3D%22https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%20%3C%2FA%3E%20will%20issue%20the%20modern%20Auth%20Token%20to%20the%20client%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20then%20submits%20this%20token%20that%20it%20received%20%3CA%20href%3D%22https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%20%3C%2FA%3E%20to%20Webticket%20Service%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EWebticket%20service%20now%20will%20grant%20a%20Webticket%20to%20the%20Client%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20client%20then%20submits%20this%20webticket%20to%20Autodiscover%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESince%20the%20SFB%20user%20is%20homed%20Online%2C%20In%20Response%20Autodiscover%20will%20provide%20the%20Online%20Autodiscover%20webservices%20URL's%20names%20(%20%3CA%20href%3D%22https%3A%2F%2Fwebdir2a.online.lync.com%2FAutodiscover%2FAutodiscoverService.svc%2Froot%3ForiginalDomain%3Dcloudsfb.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fwebdir2a.online.lync.com%2FAutodiscover%2FAutodiscoverService.svc%2Froot%3ForiginalDomain%3Dcloudsfb.com%20%3C%2FA%3E%20)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESFB%20Client%20then%20sends%20a%20Request%20to%20Autodiscover%20to%20discover%20its%20pool%20for%20sign%20in.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20is%20then%20challenged%20and%20is%20provided%20the%20URL%20for%20Webticket%20service%20where%20it%20can%20request%20a%20Webticket%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20then%20sends%20a%20POST%20request%20to%20Webticket%20Service%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EWebticket%20Service%20Redirects%20the%20Client%20to%20Modern%20Auth%20Provider%20(login.windows.net)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ENow%20in%20order%20to%20authenticate%20the%20client%20reaches%20out%20to%20Login.windows.net%20and%20requests%20a%20Token%2C%20The%20intention%20here%20is%20to%20Get%20a%20Token%20from%20login.windows.net%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EFrom%20this%20point%20onwards%20we%20will%20see%20that%20login.windows.net%20will%20redirect%20the%20client%20to%20login.microsoftonline.com%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESince%20the%20tenant%20is%20enabled%20for%20ADFS%20the%20client%20is%20then%20redirected%20to%20the%20ON%20Premise%20ADFS%20server%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESFB%20client%20will%20then%20send%20a%20request%20to%20ADFS%20server%20and%20request%20a%20token%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20may%20receive%20a%20Password%20prompt%20(or%20previously%20saved%20password%20from%20credential%20manager%20is%20passed)%20and%20once%20the%20correct%20password%20is%20provided%2C%20ADFS%20will%20issue%20a%20Token%20to%20the%20client%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20then%20submits%20this%20token%20to%20login.microsoftonline.com%20which%20in%20turn%20passes%20the%20client%20to%20Login.windows.net%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ELogin.windows.net%20will%20now%20issue%20the%20Modern%20Auth%20Token%20to%20the%20client%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20then%20submits%20this%20token%20that%20it%20received%20from%20Login.windows.net%20to%20Webticket%20Service%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EWebticket%20service%20now%20will%20grant%20a%20Webticket%20to%20the%20Client%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20client%20then%20submits%20this%20webticket%20to%20Autodiscover%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIn%20Response%20Autodiscover%20will%20provide%20the%20Pool%20names%20(sipfed2a.online.lync.com%22%20port%3D%22443)%20where%20the%20client%20can%20send%20Register%20to%20Sign%20in%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20SFB%20client%20now%20sends%20a%20SIP%20register%20to%20the%20Online%20Edge%20pool%20(sipfed2a.online.lync.com%22%20port%3D%22443)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIt%20is%20then%20challenged%20for%20authentication%20again%2C%20here%20the%20ONLY%20supported%20method%20of%20authentication%20is%20TLS-DSK%2C%20The%20client%20is%20provided%20a%20Cert%20provisioning%20URL%20(%20%3CA%20href%3D%22https%3A%2F%2Fwebdir2a.online.lync.com%3A443%2FCertProv%2FCertProvisioningService.svc%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fwebdir2a.online.lync.com%3A443%2FCertProv%2FCertProvisioningService.svc%20%3C%2FA%3E%20)%20in%20the%20401%20unauthenticated%20response%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20SFB%20client%20then%20sends%20a%20request%20to%20Certprov%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EHere%20again%20the%20Client%20is%20challenged%20for%20authentication%20and%20is%20redirected%20to%20webticket%20service%20to%20get%20Webticket%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20had%20already%20Obtained%20a%20webticket%20in%20step%2026%20above%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20client%20will%20submit%20the%20same%20webticket%20obtained%20in%20step%2026%20to%20the%20Cert%20provisioning%20service%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20Client%20then%20receives%20a%20certificate%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20SFB%20client%20can%20now%20send%20a%20Register%20again%20and%20use%20the%20certificate%20it%20downloaded%20for%20authentication%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FOL%3E%3CBR%20%2F%3E%20%3CSTRONG%3E%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3EBelow%20is%20a%20graphical%20representation%20of%20the%20SFB%20online%20Client%20Sign%20in%20process%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image001%22%20border%3D%220%22%20height%3D%224085%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115396i14BE5B96D8DBE29C%22%20title%3D%22clip_image001%22%20width%3D%221585%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20Detailed%20Explanation%20of%20SFB%20online%20Client%20Sign%20in%20process%20with%20LOG%20Snippets%3A%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20SIP%20URI%20of%20the%20user%20-%20ex3%40cloudsfb.com%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20When%20a%20SFB%20client%20wants%20to%20Sign%20in%2C%20It%20needs%20to%20know%20where%20it%20can%20send%20its%20request%20to%20be%20able%20to%20Sign%20in.%20Whenever%20a%20user%20enters%20his%20SIP%20URI%20to%20sign%20in%20the%20SFB%20client%20forms%20an%20autodiscover%20URL%20using%20the%20domain%20name%20that%20it%20extracts%20from%20the%20users%20SIP%20URI%20to%20start%20the%20discovery%20process%20and%20then%20it%20sends%20an%20Unauthenticated%20Get%20request%20to%20the%20URL%2C%20lyncdiscover.domain.com.%20The%20response%20code%20for%20this%20request%20will%20be%20'200%20ok'%20and%20in%20the%20response%20we%20should%20receive%20the%20external%20webservices%20URL%20for%20autodiscover.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image002%22%20border%3D%220%22%20height%3D%22654%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115397i91B014919BBDBC8B%22%20title%3D%22clip_image002%22%20width%3D%221564%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20The%20SFB%20Client%20learns%20that%20it%20needs%20to%20Contact%20%3CA%20href%3D%22https%3A%2F%2Fwebext.cloudsfb.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwebext.cloudsfb.com%2F%3C%2FA%3E%20(This%20is%20the%20External%20webservices%20URL%20for%20autodiscover%20on%20the%20ON%20Premise%20SFB%20environment)%20It%20then%20tries%20to%20Do%20a%20TCP%20handshake%20with%20webext.cloudsfb.com%2C%20Followed%20by%20a%20TLS%20handshake.%20(I%20haven't%20included%20the%20TCP%20and%20TLS%20handshake%20screen%20shots%20here%2C%20you%20can%20see%20those%20if%20you%20collect%20a%20Network%20trace%20while%20signing%20in)%20The%20client%20then%20sends%20a%20request%20to%20the%20user%20URL.%20We%20are%20here%20trying%20to%20discover%20a%20specific%20users%20home%20pool%2C%20hence%20the%20request%20will%20go%20to%20the%20%E2%80%9CUser%E2%80%9D%20URL.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20In%20the%20response%2C%20the%20Client%20receives%20a%20Web%20ticket%20URL%2C%20which%20provides%20the%20location%20of%20the%20WebTicketService.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20You%20can%20see%20the%20request%20and%20Response%20below%20The%20Client%20then%20needs%20to%20send%20a%20Request%20to%20the%20Web%20ticket%20service%20URL%20in%20order%20to%20obtain%20a%20Web%20ticket.%20The%20client%20will%20send%20this%20request%20in%20a%20POST%20message%20to%20the%20web%20ticket%20Service.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Now%20since%20we%20have%20Modern%20Auth%20enabled%20ON%20Premise%20the%20Web%20Ticket%20Service%20will%20redirect%20the%20client%20to%20the%20MA%20provider%20URL%20for%20ON%20PREM%20-%20%3COAUTH%20authorizationuri%3D%22https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%22%20af%3D%22%26quot%3Burn%3Acomponent%3AMicrosoft.Rtc.WebAuthentication.2010%26quot%3B%22%3E%3C%2FOAUTH%3E%20We%20can%20see%20this%20below%20The%20Client%20will%20Now%20send%20a%20Request%20to%20%3CA%20href%3D%22https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%3C%2FA%3E%20to%20get%20the%20MA%20Token%2C%20You%20will%20see%20several%20HTTP%20GET%20and%20POST%20messages%20exchanged%20between%20Client%20and%20%3CA%20href%3D%22https%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsts.cloudsfb.com%2Fadfs%2Foauth2%2Fauthorize%3C%2FA%3E%20during%20this%20process.%20Below%20screen%20shot%20lists%20some%20of%20them%20During%20the%20above%20process%20the%20Client%20will%20be%20challenged%20for%20password%20by%20MA%20or%20if%20the%20user%20had%20signed%20in%20before%20and%20the%20password%20is%20saved%20in%20Credential%20manager%20then%20this%20password%20will%20be%20passed%20and%20user%20may%20not%20see%20the%20Prompt.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Finally%20the%20Client%20will%20receive%20a%20Token%20from%20MA%20provider%2C%20you%20can%20see%20this%20below%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image006%22%20border%3D%220%22%20height%3D%22862%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115401i27CBA5EAFAB98FE8%22%20title%3D%22clip_image006%22%20width%3D%221588%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20The%20Client%20will%20then%20Submit%20this%20token%20to%20the%20Webticket%20service%20which%20will%20then%20issue%20a%20Webticket%2C%20This%20can%20be%20seen%20below%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image007%22%20border%3D%220%22%20height%3D%22902%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115402iEB8B6D7273DBBCE7%22%20title%3D%22clip_image007%22%20width%3D%221589%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20The%20Client%20will%20Then%20Submit%20this%20web%20ticket%20back%20to%20the%20AutoDiscover%20User%20URL%20-%20%2FAutodiscover%2FAutodiscoverService.svc%2Froot%2Fuser%3ForiginalDomain%3Dcloudsfb.com%26amp%3Bsipuri%3Dex3%40cloudsfb.com%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20In%20response%20it%20will%20now%20receive%20the%20Online%20Autodiscover%20webservices%20URL%20names%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20You%20can%20see%20this%20in%20the%20trace%20below%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image008%22%20border%3D%220%22%20height%3D%22733%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115403i3086877B94751DCF%22%20title%3D%22clip_image008%22%20width%3D%221594%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Now%20the%20Client%20will%20send%20a%20Unauthenticated%20Get%20request%20to%20Webdir2a.online.lync.com%20and%20in%20Response%20it%20receives%20the%20Autodiscover%20URL's%20specific%20to%20the%20users%20Tenant.%20You%20can%20see%20the%20request%20and%20Response%20below%20The%20client%20then%20sends%20a%20request%20to%20the%20user%20URL.%20We%20are%20here%20trying%20to%20discover%20a%20specific%20users%20home%20pool%2C%20hence%20the%20request%20will%20go%20to%20the%20%E2%80%9CUser%E2%80%9D%20URL.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20In%20the%20response%2C%20the%20Client%20receives%20a%20Web%20ticket%20URL%2C%20which%20provides%20the%20location%20of%20the%20WebTicketService.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20You%20can%20see%20the%20request%20and%20Response%20below%20The%20Client%20then%20needs%20to%20send%20a%20Request%20to%20the%20Web%20ticket%20service%20URL%20in%20order%20to%20obtain%20a%20Web%20ticket.%20The%20client%20will%20send%20this%20request%20in%20a%20POST%20message%20to%20the%20web%20ticket%20Service.%20Now%20since%20Modern%20Authentication%20is%20enabled%20on%20the%20Tenant%2C%20in%20order%20to%20grant%20the%20webticket%20the%20client%20will%20first%20need%20to%20get%20a%20Token%20from%20the%20Modern%20Auth%20provider%20so%20the%20client%20is%20redirected%20to%20the%20Modern%20Auth%20provider%20URL%20-%20%3COAUTH%20authorizationuri%3D%22%26quot%3Bhttps%3A%2F%2Flogin.windows.net%2Fcommon%2Foauth2%2Fauthorize%26quot%3B%22%20af%3D%22%26quot%3Burn%3Acomponent%3AMicrosoft.Rtc.WebAuthentication.2010%26quot%3B%22%3E%3C%2FOAUTH%3E%20The%20Client%20then%20sends%20a%20request%20to%20the%20MA%2FOauth%20URL%20to%20request%20a%20Token%2C%20The%20intention%20here%20is%20to%20Get%20a%20Token%20from%20login.windows.net%20From%20this%20point%20onwards%20we%20will%20see%20that%20login.windows.net%20will%20redirect%20the%20client%20to%20-%20login.microsoftonline.com.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Below%20is%20the%20Request%20that%20client%20sends%20to%20the%20MA%2FOAUTH%20URL%20and%20in%20response%20it%20is%20redirected%20to%20AD%20-%20login.microsoftonline.com%20We%20have%20to%20remember%20that%20%22The%20intention%20here%20is%20to%20Get%20a%20Token%20from%20login.windows.net%22%20we%20will%20see%20several%20exchanges%20happening%20between%20client%20to%20login.microsoftonline.com.%20Below%20are%20screen%20shots%20showing%20these%20exchanges.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image013%22%20border%3D%220%22%20height%3D%221079%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115408i001AD1A8E26E4A44%22%20title%3D%22clip_image013%22%20width%3D%221627%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Now%2C%20Since%20the%20customer%20has%20ADFS%2C%20the%20Modern%20Auth%20provider%20will%20redirect%20the%20client%20to%20the%20ADFS%20Server.%20Below%20is%20the%20screen%20shot%20showing%20login.microsoftonline.com%20redirecting%20the%20client%20to%20ADFS%20The%20Client%20will%20then%20reach%20out%20to%20ADFS%20to%20get%20an%20ADFS%20Token.%20The%20Next%20Two%20Screen%20shots%20show%20that%3B%20(This%20is%20where%20the%20user%20might%20get%20prompted%20to%20enter%20credentials%20or%20if%20his%20credentials%20are%20already%20stored%20in%20credential%20manager%20then%20those%20credentials%20will%20be%20passed%20in%20the%20background%20and%20the%20user%20may%20not%20see%20the%20prompt)%20The%20Client%20will%20then%20Submit%20this%20Token%20to%20Login.microsoftonline.com%2C%20where%20it%20will%20be%20redirected%20again%20to%20%3CA%20href%3D%22https%3A%2F%2FLogin.windows.net%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2FLogin.windows.net%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2FLogin.windows.net%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2FLogin.windows.net%3C%2FA%3E%20will%20finally%20provide%20the%20client%20with%20the%20Modern%20Auth%20Token%2C%20This%20is%20shown%20in%20the%20two%20screen%20shots%20below%20Now%20the%20client%20will%20submit%20this%20token%20to%20the%20webticket%20URL%2C%20and%20the%20Webticket%20service%20will%20issue%20the%20webticket%2C%20Shown%20below%20The%20client%20will%20then%20submit%20this%20webticket%20to%20Autodiscover%20and%20in%20return%20it%20will%20receive%20the%20POOL%20names%20where%20it%20has%20to%20send%20the%20Register%20to%20Sign%20in.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image020%22%20border%3D%220%22%20height%3D%22828%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115415iDE1B4B030ABA6780%22%20title%3D%22clip_image020%22%20width%3D%221650%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Once%20the%20Client%20receives%20the%20pool%20names%20it%20will%20then%20Send%20a%20SIP%20REGISTER%20message%20to%20the%20SFB%20pool%20in%20order%20to%20sign%20in.%20.%20You%20can%20see%20that%20in%20the%20Client%20UCCAPI%20log%20file.%20This%20is%20shown%20in%20the%20snippet%20below%20In%20response%20the%20Client%20will%20now%20receive%20a%20401%20Unauthorized%20message%20again%20and%20the%20server%20will%20again%20ask%20the%20client%20to%20authenticate%20itself.%20Here%20the%20ONLY%20method%20of%20authentication%20that%20is%20available%20is%20TLS-DSK%20(Cert%20based%20authentication)%20The%20SFB%20online%20server%20will%20provide%20the%20Client%20a%20Cert%20provisioning%20URL%20in%20the%20401%20you%20can%20see%20that%20in%20the%20snippet%20below%20This%20means%20that%20the%20Client%20now%20needs%20to%20present%20a%20Certificate%20that%20can%20then%20be%20used%20to%20authenticate%20the%20client.%20Since%20this%20is%20the%20first%20time%20the%20client%20is%20signing%20in%20it%20will%20NOT%20have%20the%20certificate%20installed.%20This%20certificate%20is%20ideally%20downloaded%20after%20the%20client%20signs%20in%20for%20the%20first%20time%20and%20is%20valid%20for%20about%208%20hours.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Since%20the%20client%20does%20not%20have%20a%20valid%20certificate%20it%20now%20has%20to%20Re-Authenticate%20to%20the%20Cert%20provisioning%20service.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20The%20Process%20for%20this%20will%20again%20be%20the%20same%2C%20The%20client%20will%20send%20a%20request%20to%20the%20Cert%20Provisioning%20URL%20where%20it%20will%20be%20challenged%20to%20get%20a%20Webticket.%20The%20client%20has%20to%20first%20get%20a%20Web%20ticket%20from%20the%20webticket%20service%20URL%2C%20to%20get%20a%20web%20ticket%20it%20needs%20to%20get%20a%20Token%20from%20Modern%20Auth%20Provider%2C%20but%20we%20know%20that%20the%20client%20has%20already%20done%20these%20steps%20earlier.%20SO%20it%20already%20has%20a%20Web%20Ticket%20from%20the%20Web%20services%20URL.%20The%20Client%20needs%20to%20submit%20this%20same%20web%20ticket%20that%20it%20had%20obtained%20to%20the%20Cert%20provisioning%20Service%20and%20once%20it%20submits%20the%20web%20ticket%20it%20will%20serve%20as%20a%20proof%20of%20authentication.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20The%20Client%20learns%20about%20this%20by%20first%20sending%20a%20Mex%20request%20to%20the%20Cert%20provisioning%20URL.%20You%20can%20see%20that%20in%20the%20Trace%20below%20The%20Client%20then%20submits%20the%20Web%20Ticket%20that%20it%20had%20received%20previously%20to%20the%20Cert%20provisioning%20URL%20it%20received%20above%2C%20after%20this%20it%20receives%20a%20200%20OK%20in%20which%20it%20receives%20the%20Certificate%20The%20clients%20will%20then%20submit%20this%20certificate%20back%20to%20the%20pool%20and%20will%20receive%20a%20200%20OK%20in%20response.%20The%20Sign%20in%20is%20then%20complete%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image025%22%20border%3D%220%22%20height%3D%22908%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115420i0AB469E23D268809%22%20title%3D%22clip_image025%22%20width%3D%221700%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22clip_image026%22%20border%3D%220%22%20height%3D%22840%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115421iFA6BF891DC2F1B2A%22%20title%3D%22clip_image026%22%20width%3D%221704%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3E%20Sign%20in%20is%20NOW%20Complete!!!%3C%2FSTRONG%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-621482%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TECHNET%20on%20Apr%2013%2C%202018%20Scenario%3A%20SFB%20Hybrid%20environment%2C%20SFB%20user%20is%20homed%20Online%2C%20ADFS%20is%20Configured%2C%20MA%20(Modern%20Auth)%20is%20enabled%20ON%20premise%20through%20On%20premise%20AD%20(NOT%20Hybrid%20MA%20EVOSTS)%20and%20also%20enabled%20in%20O365NOTE%3AI%20have%20tried%20my%20best%20to%20ensure%20the%20information%20below%20is%20accurate.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-621482%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eadfs%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAuthentication%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHybrid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Emodern%20auth%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENextHop%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESfB%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esfb%20client%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esfb%20client%20sign%20in%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
First published on TECHNET on Apr 13, 2018
Scenario: SFB Hybrid environment, SFB user is homed Online, ADFS is Configured, MA (Modern Auth) is enabled ON premise through On premise AD (NOT Hybrid MA EVOSTS) and also enabled in O365

NOTE:

I have tried my best to ensure the information below is accurate. Some of the terms I use to describe things like Modern Auth provider, O365 AD, Org ID etc. may not be standard terminology, I use them solely to make the understanding simpler. My intention here is to explain what happens in the background when a SFB client signs in so that it helps engineers and customers troubleshooting issues related to Sign in and Authentication.



How Does it Work?

Below is a High level explanation on how the SFB online Client Sign in process works



SIP URI of the user - ex3@cloudsfb.com

  1. SFB client Queries DNS for Lyncdiscover.domain.com. This should point to External web services URL (ON Premise Reverse Proxy) which in this case is webext.cloudsfb.com

  2. SFB Client then sends a unauthenticated GET request to Lyncdiscover.domain.com

  3. The Client is then redirected to Autodiscover

  4. SFB Client then sends a Request to Autodiscover to discover its pool for sign in.

  5. The Client is then challenged and is provided the URL for Webticket service where it can request a Webticket

  6. The Client then sends a POST request to Webticket Service

  7. Webticket Service Redirects the Client to ON PREM Modern Auth Provider ( https://sts.cloudsfb.com/adfs/oauth2/authorize )

  8. Now in order to authenticate the client reaches out to https://sts.cloudsfb.com/adfs/oauth2/authorize and requests a Token, The intention here is to Get a Token from https://sts.cloudsfb.com/adfs/oauth2/authorize

  9. The Client may receive a Password prompt (or previously saved password from credential manager is passed) and once the correct password is provided, https://sts.cloudsfb.com/adfs/oauth2/authorize will issue the modern Auth Token to the client

  10. The Client then submits this token that it received https://sts.cloudsfb.com/adfs/oauth2/authorize to Webticket Service

  11. Webticket service now will grant a Webticket to the Client

  12. The client then submits this webticket to Autodiscover

  13. Since the SFB user is homed Online, In Response Autodiscover will provide the Online Autodiscover webservices URL's names ( https://webdir2a.online.lync.com/Autodiscover/AutodiscoverService.svc/root?originalDomain=clou... )

  14. SFB Client then sends a Request to Autodiscover to discover its pool for sign in.

  15. The Client is then challenged and is provided the URL for Webticket service where it can request a Webticket

  16. The Client then sends a POST request to Webticket Service

  17. Webticket Service Redirects the Client to Modern Auth Provider (login.windows.net)

  18. Now in order to authenticate the client reaches out to Login.windows.net and requests a Token, The intention here is to Get a Token from login.windows.net

  19. From this point onwards we will see that login.windows.net will redirect the client to login.microsoftonline.com

  20. Since the tenant is enabled for ADFS the client is then redirected to the ON Premise ADFS server

  21. SFB client will then send a request to ADFS server and request a token

  22. The Client may receive a Password prompt (or previously saved password from credential manager is passed) and once the correct password is provided, ADFS will issue a Token to the client

  23. The Client then submits this token to login.microsoftonline.com which in turn passes the client to Login.windows.net

  24. Login.windows.net will now issue the Modern Auth Token to the client

  25. The Client then submits this token that it received from Login.windows.net to Webticket Service

  26. Webticket service now will grant a Webticket to the Client

  27. The client then submits this webticket to Autodiscover

  28. In Response Autodiscover will provide the Pool names (sipfed2a.online.lync.com" port="443) where the client can send Register to Sign in

  29. The SFB client now sends a SIP register to the Online Edge pool (sipfed2a.online.lync.com" port="443)

  30. It is then challenged for authentication again, here the ONLY supported method of authentication is TLS-DSK, The client is provided a Cert provisioning URL ( https://webdir2a.online.lync.com:443/CertProv/CertProvisioningService.svc ) in the 401 unauthenticated response

  31. The SFB client then sends a request to Certprov

  32. Here again the Client is challenged for authentication and is redirected to webticket service to get Webticket

  33. The Client had already Obtained a webticket in step 26 above

  34. The client will submit the same webticket obtained in step 26 to the Cert provisioning service

  35. The Client then receives a certificate

  36. The SFB client can now send a Register again and use the certificate it downloaded for authentication




Below is a graphical representation of the SFB online Client Sign in process



clip_image001



Detailed Explanation of SFB online Client Sign in process with LOG Snippets:

SIP URI of the user - ex3@cloudsfb.com

When a SFB client wants to Sign in, It needs to know where it can send its request to be able to Sign in. Whenever a user enters his SIP URI to sign in the SFB client forms an autodiscover URL using the domain name that it extracts from the users SIP URI to start the discovery process and then it sends an Unauthenticated Get request to the URL, lyncdiscover.domain.com. The response code for this request will be '200 ok' and in the response we should receive the external webservices URL for autodiscover.

clip_image002

The SFB Client learns that it needs to Contact https://webext.cloudsfb.com/ (This is the External webservices URL for autodiscover on the ON Premise SFB environment)

It then tries to Do a TCP handshake with webext.cloudsfb.com, Followed by a TLS handshake. (I haven't included the TCP and TLS handshake screen shots here, you can see those if you collect a Network trace while signing in)

The client then sends a request to the user URL. We are here trying to discover a specific users home pool, hence the request will go to the “User” URL.

In the response, the Client receives a Web ticket URL, which provides the location of the WebTicketService.

You can see the request and Response below

clip_image003

The Client then needs to send a Request to the Web ticket service URL in order to obtain a Web ticket. The client will send this request in a POST message to the web ticket Service.

Now since we have Modern Auth enabled ON Premise the Web Ticket Service will redirect the client to the MA provider URL for ON PREM - <af:OAuth af:authorizationUri= https://sts.cloudsfb.com/adfs/oauth2/authorize xmlns:af="urn:component:Microsoft.Rtc.WebAuthentication.2010" />

We can see this below

clip_image004

The Client will Now send a Request to https://sts.cloudsfb.com/adfs/oauth2/authorize to get the MA Token, You will see several HTTP GET and POST messages exchanged between Client and https://sts.cloudsfb.com/adfs/oauth2/authorize during this process. Below screen shot lists some of them

clip_image005

During the above process the Client will be challenged for password by MA or if the user had signed in before and the password is saved in Credential manager then this password will be passed and user may not see the Prompt.

Finally the Client will receive a Token from MA provider, you can see this below

clip_image006

The Client will then Submit this token to the Webticket service which will then issue a Webticket, This can be seen below

clip_image007

The Client will Then Submit this web ticket back to the AutoDiscover User URL - /Autodiscover/AutodiscoverService.svc/root/user?originalDomain=cloudsfb.com&sipuri=ex3@cloudsfb.com

In response it will now receive the Online Autodiscover webservices URL names

You can see this in the trace below

clip_image008

Now the Client will send a Unauthenticated Get request to Webdir2a.online.lync.com and in Response it receives the Autodiscover URL's specific to the users Tenant. You can see the request and Response below

clip_image009

The client then sends a request to the user URL. We are here trying to discover a specific users home pool, hence the request will go to the “User” URL.

In the response, the Client receives a Web ticket URL, which provides the location of the WebTicketService.

You can see the request and Response below

clip_image010

The Client then needs to send a Request to the Web ticket service URL in order to obtain a Web ticket. The client will send this request in a POST message to the web ticket Service. Now since Modern Authentication is enabled on the Tenant, in order to grant the webticket the client will first need to get a Token from the Modern Auth provider so the client is redirected to the Modern Auth provider URL - <af:OAuth af:authorizationUri="https://login.windows.net/common/oauth2/authorize" xmlns:af="urn:component:Microsoft.Rtc.WebAuthentication.2010" />

clip_image011

The Client then sends a request to the MA/Oauth URL to request a Token, The intention here is to Get a Token from login.windows.net

From this point onwards we will see that login.windows.net will redirect the client to - login.microsoftonline.com.

Below is the Request that client sends to the MA/OAUTH URL and in response it is redirected to AD - login.microsoftonline.com

clip_image012

We have to remember that "The intention here is to Get a Token from login.windows.net" we will see several exchanges happening between client to login.microsoftonline.com. Below are screen shots showing these exchanges.

clip_image013

Now, Since the customer has ADFS, the Modern Auth provider will redirect the client to the ADFS Server. Below is the screen shot showing login.microsoftonline.com redirecting the client to ADFS

clip_image014

The Client will then reach out to ADFS to get an ADFS Token. The Next Two Screen shots show that;

(This is where the user might get prompted to enter credentials or if his credentials are already stored in credential manager then those credentials will be passed in the background and the user may not see the prompt)

clip_image015

clip_image016

The Client will then Submit this Token to Login.microsoftonline.com, where it will be redirected again to https://Login.windows.net and https://Login.windows.net will finally provide the client with the Modern Auth Token, This is shown in the two screen shots below

clip_image017

clip_image018

Now the client will submit this token to the webticket URL, and the Webticket service will issue the webticket, Shown below

clip_image019

The client will then submit this webticket to Autodiscover and in return it will receive the POOL names where it has to send the Register to Sign in.

clip_image020

Once the Client receives the pool names it will then Send a SIP REGISTER message to the SFB pool in order to sign in. . You can see that in the Client UCCAPI log file. This is shown in the snippet below

clip_image021

In response the Client will now receive a 401 Unauthorized message again and the server will again ask the client to authenticate itself. Here the ONLY method of authentication that is available is TLS-DSK (Cert based authentication)

The SFB online server will provide the Client a Cert provisioning URL in the 401 you can see that in the snippet below

clip_image022

This means that the Client now needs to present a Certificate that can then be used to authenticate the client. Since this is the first time the client is signing in it will NOT have the certificate installed. This certificate is ideally downloaded after the client signs in for the first time and is valid for about 8 hours.

Since the client does not have a valid certificate it now has to Re-Authenticate to the Cert provisioning service.

The Process for this will again be the same, The client will send a request to the Cert Provisioning URL where it will be challenged to get a Webticket. The client has to first get a Web ticket from the webticket service URL, to get a web ticket it needs to get a Token from Modern Auth Provider, but we know that the client has already done these steps earlier. SO it already has a Web Ticket from the Web services URL. The Client needs to submit this same web ticket that it had obtained to the Cert provisioning Service and once it submits the web ticket it will serve as a proof of authentication.

The Client learns about this by first sending a Mex request to the Cert provisioning URL. You can see that in the Trace below

clip_image023

The Client then submits the Web Ticket that it had received previously to the Cert provisioning URL it received above, after this it receives a 200 OK in which it receives the Certificate

clip_image024

The clients will then submit this certificate back to the pool and will receive a 200 OK in response. The Sign in is then complete

clip_image025

clip_image026



Sign in is NOW Complete!!!