# Set SharePoint Connection Settings

Creates and validates the SharePoint site / document library connection settings. Produces `PAWOffice365ConnectionSettings`.

If `DriveName` is empty, the site's default document library is used.


---

### :arrow_left:**INPUT**

| **Parameter** | **Type** | **Required** | **Description** |
|-----------|------|----------|-------------|
| `TenantId` | `String` | ✅Yes     | Azure AD tenant ID |
| `ClientId` | `String` | ✅Yes     | Application (client) ID (GUID) |
| `ClientSecret` | `SecureString` | ❌No      | Application secret (required if there is no `Username`) |
| `Username` | `String` | ❌No      | User name (ROPC flow) |
| `Password` | `SecureString` | ❌No      | User password (required if `Username` is set) |
| `SiteUrl` | `String` | ✅Yes     | SharePoint site URL |
| `DriveName` | `String` | ❌No      | Document library name; default drive if empty |


---

### :arrow_right:**OUTPUT**

| **Parameter** | **Type** | **Description** |
|-----------|------|-------------|
| `IsSetPAWOffice365OneDriveConnectionSettingsSuccessful` | `Boolean` | Operation success status |
| `SetPAWOffice365OneDriveConnectionSettingsMessage` | `String` | Status/error message |
| `SetPAWOffice365OneDriveConnectionSettingsResult` | `PAWOffice365ConnectionSettings` | SharePoint connection settings |


---

### :arrow_down:**MISC**

| **Parameter** | **Type** | **Default** | **Description** |
|-----------|------|---------|-------------|
| `ThrowException` | `Boolean` | ❌No     | Specifies whether an exception is thrown when the operation fails. The default value is "**No**". |