---
title: Ms Graph Refresh Token Generator
slug: connectors/ms-graph-refresh-token-generator
docTags: 
createdAt: 2026-06-09T16:30:13.781Z
---

This connector automates the generation of refresh tokens for Microsoft Graph API, streamlining authentication processes.

Microsoft Graph is a powerful gateway to data and intelligence in Microsoft 365, providing unified programmability for services like Outlook, Teams, and OneDrive. The MS Graph Refresh Token Generator connector simplifies authentication by generating and managing refresh tokens for seamless API integration. This connector empowers Swimlane Turbine users to maintain continuous access to Microsoft Graph resources, ensuring automated workflows remain uninterrupted. By handling the complexities of token generation and interactive logins, users can focus on orchestrating security playbooks with confidence.

### Limitations

None to date.

### Supported Versions

This MS Graph Refresh Token Generator connector uses the latest Version API.

## Configuration

### Prerequisites

To effectively utilize the MS Graph Refresh Token Generator with Swimlane, ensure you have the following prerequisites:

- OAuth 2.0 client credentials authentication with the following parameters:
  - URL: The endpoint for Microsoft Graph API.
  - Client ID: The application (client) ID registered in the Azure portal.
  - Client Secret: The secret key generated for the registered application in Azure.
  - Tenant ID: The directory (tenant) ID from the Azure portal.

## Authentication Methods

### OAuth 2.0 client credentials authentication with these parameters:

- URL: Endpoint for Microsoft Graph API.
- Client ID: Application (client) ID registered in Azure AD.
- Client Secret: Client secret (key) generated for the application in Azure AD.
- Tenant ID: Directory ID of the Azure AD tenant.
- Scope: Permissions the app requires.

## Capabilities

This MS Graph Refresh Token Generator connector provides the following capabilities:

- Generate Refresh Token
- Initiate Interactive Login

### Generate Refresh Token

Generate refresh token using auth code generated in interactive login.

### Initiate Interactive Login

Initiate interactive login.

# Configurations

## MS Refresh Token Generator Auth

Authenticates using oauth 2.0 client credentials

### Configuration Parameters

| **Parameter** | **Description**                    | **Type** | **Required** |
| ------------- | ---------------------------------- | -------- | ------------ |
| url           | A URL to the target host.          | string   | Required     |
| tenant\_id    |                                    | string   | Required     |
| cl\_id        | The client ID                      | string   | Required     |
| cl\_secret    | The client secret.                 | string   | Required     |
| scope         | Permission scopes for this action. | array    | Optional     |
| verify\_ssl   | Verify SSL certificate             | boolean  | Optional     |
| http\_proxy   | A proxy to route requests through. | string   | Optional     |

# Actions

## Generate Refresh Token

Generates a refresh token for MS Graph using provided authorization code, redirect URI, and code verifier.

### Endpoint

- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                                             |
| ----------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------- |
| `auth_code`       | string   | Required     | Parameter for Generate Refresh Token                                                                        |
| `code_verifier`   | string   | Required     | Parameter for Generate Refresh Token                                                                        |
| `redirect_uri`    | string   | Required     | The URL to redirect to after login. This must match one of the registered URIs in your app's settings page. |

### Input Example

`{"auth_code":"string","code_verifier":"string","redirect_uri":"string"}`

### Output

| **Parameter**   | **Type** | **Description**              |
| --------------- | -------- | ---------------------------- |
| `scope`         | string   | Output field: scope          |
| `refresh_token` | string   | Output field: refresh\_token |

### Output Example

`{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik5HVEZ2ZEstZnl0aEV1Q...","token_type":"Bearer","expires_in":3599,"scope":"https%3A%2F%2Fgraph.microsoft.com%2Fmail.read","refresh_token":"AwABAAAAvPM1KaPlrEqdFSBzjqfTGAMxZGUTdM0t4B4...","id_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJhdWQiOiIyZDRkMTFhMi1mODE0LTQ2YTctOD..."}`

## Initiate Interactive Login

Initiates an interactive login for MS Graph Refresh Token Generator using a specified redirect URI.

### Endpoint

- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                                             |
| ----------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------- |
| `redirect_uri`    | string   | Required     | The URL to redirect to after login. This must match one of the registered URIs in your app's settings page. |

### Input Example

`{"redirect_uri":"string"}`

### Output

| **Parameter**   | **Type** | **Description**          |
| --------------- | -------- | ------------------------ |
| `code_verifier` | string   | Code Verifier            |
| `login_uri`     | string   | Output field: login\_uri |
| `state`         | string   | Output field: state      |

### Output Example

`{"code_verifier":"string","login_uri":"string","state":"string"}`

# Response Headers

| **Header**   | **Description**                                       | **Example**                   |
| ------------ | ----------------------------------------------------- | ----------------------------- |
| Content-Type | The media type of the resource                        | application/json              |
| Date         | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |
