File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import {
2525 EntraGroupMetadata ,
2626 EntraInvitationResponse ,
2727 ProfilePatchRequest ,
28+ ProfilePatchWithUpnRequest ,
2829} from "../../common/types/iam.js" ;
2930import { UserProfileData } from "common/types/msGraphApi.js" ;
3031import { SecretsManagerClient } from "@aws-sdk/client-secrets-manager" ;
@@ -431,7 +432,7 @@ export async function patchUserProfile(
431432 token : string ,
432433 email : string ,
433434 userId : string ,
434- data : Partial < ProfilePatchRequest > ,
435+ data : Partial < ProfilePatchWithUpnRequest > ,
435436) : Promise < void > {
436437 try {
437438 const url = `https://graph.microsoft.com/v1.0/users/${ userId } ` ;
Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ export async function setPaidMembership({
338338 displayName : `${ firstName } ${ lastName } ` ,
339339 givenName : firstName ,
340340 surname : lastName ,
341+ userPrincipalName : `${ netId } @acm.illinois.edu` ,
341342 } ) ;
342343
343344 return { updated : true } ;
Original file line number Diff line number Diff line change @@ -83,3 +83,5 @@ export const entraProfilePatchRequest = z.object({
8383} ) ;
8484
8585export type ProfilePatchRequest = z . infer < typeof entraProfilePatchRequest > ;
86+
87+ export type ProfilePatchWithUpnRequest = ProfilePatchRequest & { userPrincipalName ?: string }
You can’t perform that action at this time.
0 commit comments