Gets a user's profile and photo in Microsoft Graph using Jigx functions, and displays the profile and photo on a jig using the image and entity component.
Required OAuth scope (least to most privilege):
User.Read User.ReadWrite User.ReadBasic.All User.Read.All User.ReadWrite.All Directory.Read.All Directory.ReadWrite.All
User Profile
Examples and code snippets
When using the code and samples in this topic, remember that they are designed to function as part of a comprehensive solution. To fully benefit from the intended functionality and ensure compatibility, it is recommended that you use the entire solution rather than selecting individual components in isolation. Alternatively, you can use these samples as a guide to understand the underlying concepts and MS Graph API, which can help you integrate similar solutions into your projects more effectively. The entire MS Graph solution is available on GitHub.
provider: DATA_PROVIDER_REST
method: GET
url: https://graph.microsoft.com/v1.0/me
useLocalCall: true
outputTransform: $
parameters:
accessToken:
location: header
required: true
type: string
# Use manage.jigx.com to define credentials for your solution.
value: microsoft.OAuth
provider: DATA_PROVIDER_REST
method: GET
# pdf indicates a generic binary type.
format: pdf
url: https://graph.microsoft.com/v1.0/me/photo/$value
# Add the email input to the output to identify image later in select
outputTransform: $.{"data":$.data,"userId":$.inputs.userId.value}
parameters:
accessToken:
location: header
required: true
type: string
# Use manage.jigx.com to define credentials for your solution
value: microsoft.OAuth
userId:
type: string
location: path
required: true
conversions:
- property: data
from: base64
to: local-uri