Skip to main content

Microsoft Graph API Component

Interact with the Microsoft Graph API

Component key: ms-graph-api

Description#

Microsft's Graph API allows you to interact with many Microsoft products from one API endpoint. You can explore the Graph API using their Graph Explorer tool.

Microsoft Graph API Connections#

OAuth 2.0 Authorization Code#

To use the Microsoft Graph API component, configure an OAuth 2.0 application through Active Directory in the Microsoft Azure Portal.

When creating the application you will be prompted to select the Supported account types. Under this section, be sure to select Accounts in any organizational directory (Any Azure AD directory - Multitenant) so that users outside of your organization (i.e. your customers) can authenticate. You will need to go to Platforms and add the Web platform. In that section you should add Prismatic's OAuth 2.0 callback URL - https://oauth2.prismatic.io/callback - as a Redirect URI.

Next, go to Certificates & Secrets for the app and add a new Client Secret. Copy the value (not ID) of the secret for future use.

You will also need the Application (client) ID from the "Overview" page.

Next, supply the following values to the OAuth 2.0 connection in your integration within Prismatic:

  • For Client ID and Client Secret enter the values that you got from the Microsoft Azure Portal.
  • The Scopes your integration requries. You can find scopes on Microsoft Graph permissions reference, or by making test calls in the Graph Explorer.
  • If you didn't select Multitenant when creating the Azure application, you will need to replace the Authorize URL and Token URL with ones specific to your tenant.

For more information regarding authenticating against the Microsoft Graph API refer to the Microsoft documentation.

InputDefaultNotes
Input
Authorize URL
string
/ Required
Default
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Notes
The OAuth 2.0 Authorization URL for Microsoft's Graph API. If you have a multi-tenant application, you can use /common/ endpoints. If you have a single-tenant app, change these URLs to your tenant-specific ones.
Input
Client ID
string
/ Required
Default
Notes
 
Input
Client secret value
password
/ Required
Default
Notes
This is the 'value' (not ID) of the client secret you generated in Azure Portal.
Input
Scopes
string
Default
https://graph.microsoft.com/User.Read.All offline_access
Notes
Add additional required scopes you identify on https://developer.microsoft.com/en-us/graph/graph-explorer to this list
Input
Token URL
string
/ Required
Default
https://login.microsoftonline.com/common/oauth2/v2.0/token
Notes
The OAuth 2.0 Token URL for Microsoft's Graph API. If you have a multi-tenant application, you can use /common/ endpoints. If you have a single-tenant app, change these URLs to your tenant-specific ones.

Actions#

Raw Request#

Send a generic request to Microsoft Graph API | key: rawRequest

InputDefaultNotesExample
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Data
string
Default
Notes
The HTTP body payload to send to the URL.
Example
{"exampleKey": "Example Data"}
Input
Debug Request
boolean
Default
false
Notes
Enabling this flag will log out the current request.
Example
 
Input
File Data
string
Key Value List
Default
Notes
File Data to be sent as a multipart form upload.
Example
[{key: "example.txt", value: "My File Contents"}]
Input
Form Data
string
Key Value List
Default
Notes
The Form Data to be sent as a multipart form upload.
Example
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Input
Header
string
Key Value List
Default
Notes
A list of headers to send with the request.
Example
User-Agent: curl/7.64.1
Input
Max Retry Count
string
Default
0
Notes
The maximum number of retries to attempt.
Example
 
Input
Method
string
/ Required
Default
Notes
The HTTP method to use.
Example
 
Input
Query Parameter
string
Key Value List
Default
Notes
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
Example
 
Input
Response Type
string
/ Required
Default
json
Notes
The type of data you expect in the response. You can request json, text, or binary data.
Example
 
Input
Retry On All Errors
boolean
Default
false
Notes
If true, retries on all erroneous responses regardless of type.
Example
 
Input
Retry Delay (ms)
string
Default
0
Notes
The delay in milliseconds between retries.
Example
 
Input
Timeout
string
Default
Notes
The maximum time that a client will await a response to its request
Example
2000
Input
URL
string
/ Required
Default
Notes
This is the URL to call.
Example
/me/joinedTeams
Input
Use Exponential Backoff
boolean
Default
false
Notes
Specifies whether to use a pre-defined exponential backoff strategy for retries.
Example