| title | Create webApplicationSegment |
|---|---|
| description | Create a new webApplicationSegment object. |
| author | dhruvinrshah |
| ms.localizationpriority | medium |
| ms.subservice | entra-applications |
| doc_type | apiPageType |
| ms.date | 12/19/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Create a new webApplicationSegment object.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
[!INCLUDE rbac-app-proxy-write]
POST /applications/{applicationObjectId}/onPremisesPublishing/segmentsConfiguration/microsoft.graph.webSegmentConfiguration/applicationSegments| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
In the request body, supply a JSON representation of the webApplicationSegment object.
You can specify the following properties when creating a webApplicationSegment.
| Property | Type | Description |
|---|---|---|
| alternateUrl | String | Optional. If you're configuring a traffic manager in front of multiple app proxy application segments, this property contains the user-friendly URL that points to the traffic manager. |
| externalUrl | String | Required. The published external URL for the application segment; for example, https://intranet.contoso.com/. |
| internalUrl | String | Required. The internal URL of the application segment; for example, https://intranet/. |
| corsConfigurations | corsConfiguration_v2 collection | Optional. A collection of CORS Rule definitions for a particular application segment. |
If successful, this method returns a 204 No Content response code.
The following example shows a request.
POST https://graph.microsoft.com/beta/applications/2709c601-fcff-4010-94ea-5f862f755568/onPremisesPublishing/segmentsConfiguration/microsoft.graph.webSegmentConfiguration/applicationSegments/
Content-Type: application/json
{
"externalUrl": "https://fe.contoso.com",
"internalUrl": "https://be.contoso.com",
"corsConfigurations": [
{
"resource": "/",
"allowedOrigins": "*",
"allowedHeaders": "*",
"allowedMethods": "*",
"maxAgeInSeconds": "3000"
}
]
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content