Hi Daniel,
Its seems based on the the provided details, now you want users from an external tenant (set up for customers as you mentioned) to log in without requiring administrative roles. I am no expert but can give some pointers that might potentially resolve the issues you're facing with your Azure AD B2B configuration:
- Authority Configuration:
- You’ve attempted to use
ciamlogin.com
endpoints, which are specific to CIAM scenarios. Ensure that the app registration in your external tenant is set up to accept such logins. However, it appears there might be a disconnect because the error suggests an authority or account type mismatch. - Consider the use of common endpoints like
https://login.microsoftonline.com/common
for broad multi-tenant applications unless your scenario specifically requiresciamlogin.com
.
- You’ve attempted to use
- Resource Tenant Setup:
- In your workforce tenant, ensure that you’ve configured the application registration and have provided the necessary permissions:
- API Permissions must include delegated permissions that external users need.
- Consider using application permissions only if backend services are accessed without user context.
- Check Role Requirements:
- If role assignments are causing issues, verify if any RBAC (Role-Based Access Control) within the app itself requires roles for access.
- Investigate User Type Handling:
- Ensure that the local account users created in the Entra External ID tenant are mapped correctly within your application's authentication logic.
- Consider Tenant ID and Domain Handling:
- Ensure your configuration allows for multi-tenant access by using the
common
endpoint effectively. Avoid narrowly defined tenant IDs unless necessary.
- Ensure your configuration allows for multi-tenant access by using the
- Debugging Authentication Flows:
- Use Azure AD’s diagnostic capabilities to trace failed sign-ins. Check for how tokens are being issued, what claims are present, and whether applications can still validate tokens correctly for these external users.
- Application Code Configuration:
- Since you have applications already working for certain conditions, ensure that the
TokenValidationParameters
do not inadvertently filter valid tokens.
- Since you have applications already working for certain conditions, ensure that the
Hope that help you resolve the issue. Do let me know if you get any success or have any follow up questions after applying above suggestions!
cheers!