async function getPhotoUrlInternal()

in src/GraphService.ts [194:208]


    async function getPhotoUrlInternal(emailOrId: string): Promise<string> {
        const adToken = await GraphServiceAuthenticator.getAuthToken();
        const request = new Request(`${graphBaseUrl}/v1.0/users/${emailOrId}/photo/$value`, {
            method: "GET",
            headers: { Authorization: `Bearer ${adToken}` }
        });

        const response = await fetch(request, { cache: "force-cache" });
        if (response.ok) {
            const photoData = await response.blob();
            return URL.createObjectURL(photoData);
        } else {
            throw buildErrorFromResponse(response);
        }
    }