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 {
25
25
EntraGroupMetadata ,
26
26
EntraInvitationResponse ,
27
27
ProfilePatchRequest ,
28
+ ProfilePatchWithUpnRequest ,
28
29
} from "../../common/types/iam.js" ;
29
30
import { UserProfileData } from "common/types/msGraphApi.js" ;
30
31
import { SecretsManagerClient } from "@aws-sdk/client-secrets-manager" ;
@@ -431,7 +432,7 @@ export async function patchUserProfile(
431
432
token : string ,
432
433
email : string ,
433
434
userId : string ,
434
- data : Partial < ProfilePatchRequest > ,
435
+ data : Partial < ProfilePatchWithUpnRequest > ,
435
436
) : Promise < void > {
436
437
try {
437
438
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({
338
338
displayName : `${ firstName } ${ lastName } ` ,
339
339
givenName : firstName ,
340
340
surname : lastName ,
341
+ userPrincipalName : `${ netId } @acm.illinois.edu` ,
341
342
} ) ;
342
343
343
344
return { updated : true } ;
Original file line number Diff line number Diff line change @@ -83,3 +83,5 @@ export const entraProfilePatchRequest = z.object({
83
83
} ) ;
84
84
85
85
export 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