cURL
curl --request POST \
--url https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alias": "<string>",
"hidden_from_end_user": true
}
'import requests
url = "https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}"
payload = {
"alias": "<string>",
"hidden_from_end_user": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({alias: '<string>', hidden_from_end_user: true})
};
fetch('https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alias' => '<string>',
'hidden_from_end_user' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}"
payload := strings.NewReader("{\n \"alias\": \"<string>\",\n \"hidden_from_end_user\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alias\": \"<string>\",\n \"hidden_from_end_user\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alias\": \"<string>\",\n \"hidden_from_end_user\": true\n}"
response = http.request(request)
puts response.read_body{
"app_resource_id": "1520617d-e72a-47f5-a84c-693817ab48ad2",
"group_id": "6f99639b-7928-4043-8184-47cbc6766145",
"alias": "finance-team",
"hidden_from_end_user": false
}Post idp group mappings groups
Creates or updates an individual IdpGroupMapping object (upsert operation).
Behavior:
- If the mapping doesn’t exist, it will be created with the provided values
- If the mapping exists, only the fields provided in the request will be updated
POST
/
idp-group-mappings
/
{app_resource_id}
/
groups
/
{group_id}
cURL
curl --request POST \
--url https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alias": "<string>",
"hidden_from_end_user": true
}
'import requests
url = "https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}"
payload = {
"alias": "<string>",
"hidden_from_end_user": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({alias: '<string>', hidden_from_end_user: true})
};
fetch('https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alias' => '<string>',
'hidden_from_end_user' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}"
payload := strings.NewReader("{\n \"alias\": \"<string>\",\n \"hidden_from_end_user\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alias\": \"<string>\",\n \"hidden_from_end_user\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/idp-group-mappings/{app_resource_id}/groups/{group_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alias\": \"<string>\",\n \"hidden_from_end_user\": true\n}"
response = http.request(request)
puts response.read_body{
"app_resource_id": "1520617d-e72a-47f5-a84c-693817ab48ad2",
"group_id": "6f99639b-7928-4043-8184-47cbc6766145",
"alias": "finance-team",
"hidden_from_end_user": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the Okta app.
The ID of the group.
Body
application/json
Optional alias for the group mapping
Whether this mapping should be hidden from end users.
- New mappings: If not provided, defaults to
false - Existing mappings: If not provided, existing value is preserved (no change)
- Explicit values: If provided, value is updated to the specified boolean
Response
200 - application/json
The IDP group mapping was successfully created or updated.
Information about a group mapping.
The ID of the group.
Example:
"6f99639b-7928-4043-8184-47cbc6766145"
A bool representing whether or not the group is hidden from the end user.
Example:
false
The ID of the app resource.
Example:
"1520617d-e72a-47f5-a84c-693817ab48ad2"
The alias of the group.
Example:
"finance-team"
Last modified on September 16, 2026
Was this page helpful?