Entra External Id with Microsoft Identity throwing AADSTS500208 unless user is Global Admin

I have a bizarre issue happening. We have two levels of user managed in our Entra Customer (preview) tenant using Microsoft Entra External Id (in preview). Advisor and Client.

Advisors are only added through direct invitation and granted the Advisor group in the tenant. Advisor accounts are created in an older Azure AD workforce tenant (our corporate accounts).

Clients are able to register through our User Flow for the application and are added to a Client group.

Our application is a .net 8.0 blazor interactive mode application using Microsoft.Idenity with a DownstreamApi.

Advisors can hit our site, be redirected to the Entra User Flow to sign in, and then are brought back to our application with claims.

Clients hit the site, go to authenticate, and then an error is thrown when they are returned to /sign-in/oidc. My test client account was created through the user flow using a gmail account (but not using google oauth, just the email).

The error in my logs:

Message contains error: ‘invalid_request’, error_description: ‘AADSTS500208: The domain is not a valid login domain for the account type. Trace ID: <> Correlation ID: <> Timestamp: 2024-05-24 14:54:37Z’, error_uri: ‘error_uri is null’.

The AzureAD section for my application, which works fine for advisors in out Test environment in Azure, is as follows:

"AzureAd": {
  "Instance": "https://login.microsoftonline.com/",
  "TenantId": "33...33",
  "ClientId": "77...77",
    
  "EnablePiiLogging": false, // set to true to enable PII


  // If the app calls downstream APIs
  "ClientCredentials": [
    
    {
      "SourceType": "ClientSecret",
      "ClientSecret": "<<omitted>>"
    }
  ],
  "SendX5C": false,

  "AllowWebApiToBeAuthorizedByACL": false,

  // If the app is a web app:
  "ResetPasswordPath": "/MicrosoftIdentity/Account/ResetPassword",
  "ErrorPath": "/MicrosoftIdentity/Account/Error",
  "WithSpaAuthCode": false,

  "Scopes": [ "User.ReadBasic.All", "user.read", "email" ]
},

// Downstream APIs
"DownstreamApis": [
  {
    "ClaimsProvider": {
      "BaseUrl": "https://my-api.azurewebsites.net/api",
      "Scopes": [ "api://my-api.azurewebsites.net/88...88/ClaimsProvider.Read" ]
    }
  }
]

I thought perhaps there was bleed-through on my corporate account, so I ran my test in an incognito browser instance and what appears to happen is after I log in and it sends me to my application at /sign-in/oidc, if I retry accessing the root url it sends me back to the user flow again as if my first login was never done/persisted. This is in the same incognito window without closing. There is no error in the userflow when I login, only after I land back in the application on the default redirect page, which works just fine for advisor accounts.

The account in Entra created when I register through the user flow:

User type: Member
Creation Type: Local account
Identities: [email protected]

And the advisor Accounts who got the invitation and work look like this:

User type: Member
Creation Type: Invitation
Identities: ExternalAzureAd

We also have this issue with any local developers who are not in the Global Admin group. They have 2 Azure accounts attached to VS (one for corporate, one for the customer tenant), but when they try to access the app with the above configuration, they get the same error. Changing the AzureAd config locally to the below fixes it for their Advisor account but does not fix the Client account when the same config is deployed into Azure

"AzureAd": {
  "Authority": "https://33...33.ciamlogin.com/33...33/v2.0",
  "Instance": "https://33...33.ciamlogin.com/33...33/v2.0",
  "Domain": "myTenant.onmicrosoft.com",
  "ClientId": "77...77",

  //... rest of config the same
}

The App service is hosted on our corporate tenant subscription in Azure and configured to use the Entra Customer tenant for authentication. The app service in Test is configured as:

App Service authentication: Enabled
Restrict access: Allow unauthenticated requests
Token store: Enabled

My Identity Provider is configured as:

Identity provider: Microsoft
App registration: Unable to resolve app registration name from registered application ID
Supported account types: Unable to resolve account type information from registered application ID
Application (client) ID: bb…bb
Client secret value: Click to edit secret value
Issuer URL: https://myTenant.ciamlogin.com
Allowed token audiences: [blank]
Client application requirement: Allow requests only from this application itself
Identity requirement: Allow requests from any identity
Tenant requirement: Allow requests from specific tenants
Allowed tenants: 33…33

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật