index.tsx650 chars22 lines
This code uses the @microsoft/microsoft-graph-client
package to initialize the Microsoft Graph client and authenticate the user. Once authenticated, it makes an API call to GET
the user's profile photo by passing the user ID to the /users/{UserId}/photo/$value
endpoint. The API response includes the user's photo as a binary data stream, which you can then display or manipulate as needed.
gistlibby LogSnag