There seems to be a current issue with logging into Microsoft Online with Mac OS and iOS devices utilizing the newest version of Safari (12).
The updates on Safari 12 a
There is a solution documented by the aspnet/security team on GitHub.
https://github.com/aspnet/Security/issues/1864
If you are using ASP.NET Core Identity you disable the protection by configuring cookies with the following code
services.ConfigureExternalCookie(options => {
// Other options
options.Cookie.SameSite = SameSiteMode.None; }); services.ConfigureApplicationCookie(options => {
// Other options
options.Cookie.SameSite = SameSiteMode.None; });
If you are using cookie authentication without ASP.NET Core identity you can turn off the protection with the following code
services.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options => {
// Other options
options.Cookie.SameSite = Microsoft.AspNetCore.Http.SameSiteMode.None; })
If you are using external OIDC providers you may be able to avoid the issue by changing the response mode your provider uses from a POST to a GET request, using the following code. Not all providers may support this.
.AddOpenIdConnect("myOIDProvider", options => {
// Other options
options.ResponseType = "code";
options.ResponseMode = "query";
};