Create remoteNetwork

Namespace: microsoft.graph.networkaccess

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Create a new remote network.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

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.

Permission type Least privileged permission Higher privileged permissions
Delegated (work or school account) Not supported. Not supported.
Delegated (personal Microsoft account) Not supported. Not supported.
Application Not supported. Not supported.

To make changes, the calling user must also be assigned at least one of the following Microsoft Entra roles.

  • Global Secure Access Administrator
  • Security Administrator

HTTP request

POST /networkAccess/connectivity/remoteNetworks

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the microsoft.graph.networkaccess.remoteNetwork object.

You can specify the following properties when creating a remote network.

Property Type Description
name String Name of the remote network. Required.
region String Specify the region closest to the remote network location. Required.

Response

If successful, this method returns a 201 Created response code and a microsoft.graph.networkaccess.remoteNetwork object in the response body.

Example 1: Create a remote network with just name and region

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/networkAccess/connectivity/remoteNetworks
Content-Type: application/json

{
    "name": "Bellevue branch",
    "region": "canadaEast"
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#networkAccess/connectivity/remoteNetworks/$entity",
    "id": "8a273997-b84d-422f-8dec-e1dd82a4035b",
    "name": "Bellevue branch",
    "region": "canadaEast",
    "version": "1.0.0",
    "lastModifiedDateTime": "2024-02-01T00:41:48Z"
}

Example 2: Create a remote network with forwarding profile

To get the ID of forwarding profiles of your organization, refer to this article - List forwardingProfiles.

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/networkAccess/connectivity/remoteNetworks
Content-Type: application/json

{
    "name": "Bellevue branch w/ fwd profile",
    "region": "canadaEast",
    "forwardingProfiles": [
        {
            "id": "1adaf535-1e31-4e14-983f-2270408162bf"
        }
    ]
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#networkAccess/connectivity/remoteNetworks/$entity",
    "id": "6542b28c-5ba7-4b50-9576-e63a6210e481",
    "name": "Bellevue branch w/ fwd profile",
    "region": "canadaEast",
    "version": "1.0.0",
    "lastModifiedDateTime": "2024-02-01T00:54:45Z"
}

To get the ID of forwarding profiles of your organization, refer to this article - List forwardingProfiles.

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/networkAccess/connectivity/remoteNetworks
Content-Type: application/json

{
    "name": "Bellevue branch w/ device link",
    "region": "canadaEast",
    "forwardingProfiles": [
        {
            "id": "1adaf535-1e31-4e14-983f-2270408162bf"
        }
    ],
    "deviceLinks": [
        {
            "name": "CPE1",
            "ipAddress": "52.13.21.25",
            "bandwidthCapacityInMbps": "mbps500",
            "deviceVendor": "barracudaNetworks",
            "bgpConfiguration": {
                "localIpAddress": "192.168.1.2",
                "peerIpAddress": "10.1.1.2",
                "asn": 65533
            },
            "redundancyConfiguration": {
                "zoneLocalIpAddress": null,
                "redundancyTier": "noRedundancy"
            },
            "tunnelConfiguration": {
                "@odata.type": "#microsoft.graph.networkaccess.tunnelConfigurationIKEv2Default",
                "preSharedKey": "test123"
            }
        }
    ]
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#networkAccess/connectivity/remoteNetworks/$entity",
    "id": "5d2f5061-4876-4c1c-ba2d-5acc6a73742d",
    "name": "Bellevue branch w/ device link",
    "region": "canadaEast",
    "version": "1.0.0",
    "lastModifiedDateTime": "2024-02-01T01:02:25Z"
}