diff --git a/server/src/main/java/access/provision/graph/GraphClient.java b/server/src/main/java/access/provision/graph/GraphClient.java index e41c2b2e..08d3fa0d 100644 --- a/server/src/main/java/access/provision/graph/GraphClient.java +++ b/server/src/main/java/access/provision/graph/GraphClient.java @@ -51,8 +51,10 @@ public GraphResponse newUserRequest(Provisioning provisioning, User user) { com.microsoft.graph.models.Invitation invitation = new com.microsoft.graph.models.Invitation(); invitation.invitedUserEmailAddress = eduidIdpSchacHomeOrganization.equalsIgnoreCase(user.getSchacHomeOrganization()) ? user.getEduPersonPrincipalName() : user.getEmail(); invitation.invitedUserDisplayName = user.getName(); - invitation.inviteRedirectUrl = String.format("%s/api/v1/invitations/ms-accept-return/%s/%s", + String redeemUrl=String.format("%s/api/v1/invitations/ms-accept-return/%s/%s", serverUrl, provisioning.getId(), user.getId()); + LOG.debug(String.format("Graph invite redeem url will be : %s", redeemUrl)); + invitation.inviteRedirectUrl = redeemUrl; invitation.sendInvitationMessage = false; invitation.invitedUserType = "Guest";