-
Notifications
You must be signed in to change notification settings - Fork 46
Implement TenantUtil object with methods to extract tenant and tenantID from identifiers, Fixes AB#3370810 #2761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… ID from identifiers
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new TenantUtil utility object that provides methods for extracting tenant information from various identifiers. The utility is designed to parse email addresses/UPNs and GUIDs to extract tenant hostnames and tenant IDs.
- Adds regex-based validation for identifiers (email/UPN format or GUID format)
- Implements tenant extraction from identifiers with hostname parsing for UPNs
- Provides tenant ID resolution from login hints using Azure Active Directory configuration
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
common4j/src/main/com/microsoft/identity/common/java/util/TenantUtil.kt
Outdated
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/util/TenantUtil.kt
Outdated
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/util/TenantUtil.kt
Outdated
Show resolved
Hide resolved
…ntUtil.kt Co-authored-by: Copilot <[email protected]>
…ntUtil.kt Co-authored-by: Copilot <[email protected]>
|
✅ Work item link check complete. Description contains link AB#3370810 to an Azure Boards work item. |
common4j/src/main/com/microsoft/identity/common/java/util/TenantUtil.kt
Outdated
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/util/TenantUtil.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
common4j/src/main/com/microsoft/identity/common/java/util/TenantUtil.kt
Outdated
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/util/TenantUtil.kt
Outdated
Show resolved
Hide resolved
…ntUtil.kt Co-authored-by: Copilot <[email protected]>
…ntUtil.kt Co-authored-by: Copilot <[email protected]>
AB#3370810
Move
getTenantFromIdentifier from WorkPlaceJoinUtil
getTenantIdFromLoginHint from AccountChooser
see https://github.com/AzureAD/microsoft-authentication-library-common-for-android/pull/2761/files