@Mahim Kumar - The CORS issue you're encountering is due to the fact that the endpoint https://teams.microsoft.com/api/mt/apac/beta/users/.../mergedProfilePicturev2
does not include the necessary Access-Control-Allow-Origin
headers, which are required for cross-origin requests from your custom Teams app hosted on https://teams.cloud.microsoft
.
To correctly fetch profile pictures within a Teams app, you should use the below Microsoft Graph API.
GET /users/{id | userPrincipalName}/photo/$value
Thanks,
Nivedipa
-----------------------------------------------------------------------------------------------------------
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.