Skip to content

Commit 1caa89a

Browse files
committed
Add homeObjectId to ILabAcccount
1 parent 7fd1e1e commit 1caa89a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/client/ILabAccount.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ public interface ILabAccount {
5858
*/
5959
String getHomeTenantId();
6060

61+
/**
62+
* Get the object id in home tenant.
63+
*
64+
* @return a String representing the account's object id in home tenant
65+
*/
66+
String getHomeObjectId();
67+
6168
/**
6269
* A client id that can be used alongside this account to get a token.
6370
*

LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/client/LabAccount.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public class LabAccount implements ILabAccount {
5252
@NonNull
5353
private final String mHomeTenantId;
5454

55+
@NonNull
56+
private final String mHomeObjectId;
57+
5558
// nullable
5659
// dependency for Nullable annotation not currently added to LabApiUtilities
5760
private final ConfigInfo mConfigInfo;

LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/client/LabClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ private ILabAccount getLabAccountObject(@NonNull final ConfigInfo configInfo) th
144144
.password(password)
145145
.userType(UserType.fromName(configInfo.getUserInfo().getUserType()))
146146
.homeTenantId(configInfo.getUserInfo().getHomeTenantID())
147+
.homeObjectId(configInfo.getUserInfo().getHomeObjectId())
147148
.configInfo(configInfo)
148149
.build();
149150
}
@@ -252,6 +253,7 @@ private ILabAccount createTempAccountInternal(@NonNull final TempUserType tempUs
252253
// all temp users created by Lab Api are currently cloud users
253254
.userType(UserType.CLOUD)
254255
.homeTenantId(tempUser.getTenantId())
256+
.homeObjectId(tempUser.getObjectId())
255257
.build();
256258
}
257259

0 commit comments

Comments
 (0)