Lasha Kakabadze
09/09/2025, 3:54 PMconfigureMapping method via the Management SDK:
let resp = await descopeClient.management.sso.configureMapping(tenantId, roleMapping, attributeMapping);
From what I understand, this updates the SSO mapping configuration for a single tenant at a time. Is there a way to perform a bulk update - for example, updating SSO mappings for multiple role/attribute mappings in one call?Nick Rodriguez
09/09/2025, 4:49 PMLasha Kakabadze
09/09/2025, 4:55 PMconfigureMapping with the above values. But it won't create and i get the following:
Status Code: 400
Error Code: E011001
Error Description: Request is malformed
Error Message: undefined
Using the same tenantId as in every other request, so that can't be a problem. Do you have any idea what might be causing this?Nick Rodriguez
09/09/2025, 5:21 PMroleMapping and attributeMapping should be arrays of objects, each with the right keys (e.g., value / attributeName, expectedValue, and roleNames as an array).
• Make sure all roleNames already exist in the project and are spelled exactly.
• Pass empty arrays ([]) if you don’t need one of the mappings—avoid null or {}.
• Strip out any hidden undefined keys from the objects.
• Confirm the tenant has an SSO connection set up before updating mappings.
If you log the JSON you’re sending before the call, you’ll usually see what’s tripping validation.Lasha Kakabadze
09/09/2025, 7:32 PMNick Rodriguez
09/09/2025, 7:42 PMLasha Kakabadze
09/09/2025, 8:04 PMNick Rodriguez
09/09/2025, 8:30 PMLasha Kakabadze
09/09/2025, 8:36 PM// Args:
// tenantId (str): The tenant ID to be configured
const tenantId = "xxxxxx"
// roleMappings (RoleMapping): A mapping between IDP groups and Descope roles.
const roleMapping = { groups: ['IDP_ADMIN'], roleName: 'Tenant Admin'}
// attributeMapping (AttributeMapping): A mapping between IDP user attributes and descope attributes.
const attributeMapping = { name: "IDP_NAME", phoneNumber: "IDP_PHONE" }
let resp = await descopeClient.management.sso.configureMapping(
tenantId,
roleMapping,
attributeMapping
)
What I don’t fully understand is the flow for updating an existing mapping.
If a user adds a new mapping and then changes either the group name or the role associated with a group, how should I send the request?
It looks like configureMapping only accepts a single objectNick Rodriguez
09/09/2025, 9:28 PMconfigureMapping, it replaces the entire mapping set; it doesn’t patch a single group or role. So if you want to add, change, or remove a mapping, you’ll need to build the full list of role-to-group mappings you want and resend it in one call (e.g. as an array of mappings). That way any updates, renames, or new groups are reflected in the full configuration.Lasha Kakabadze
09/10/2025, 9:05 AMroleMapping as an object rather than an array of objects.
The API is now working, and I was able to update the mapping successfully. However, I noticed that the Identity Provider (IdP) was deselected in Okta and reverted to a "Generic IdP" after the update.
I only modified the group mapping, do you know if there’s a way to preserve the original IdP selection in Okta during this process?Reuven Zabirov
09/10/2025, 9:13 AMLasha Kakabadze
09/10/2025, 12:02 PMdeleteSettings, and a user is authenticated via SSO, should we also log them out at that point?Nick Rodriguez
09/10/2025, 12:21 PMLasha Kakabadze
09/10/2025, 12:21 PMLasha Kakabadze
09/10/2025, 8:49 PMNick Rodriguez
09/11/2025, 2:11 PM