Retrieve Role Context

Retrieves the Role Context for a specified Role. This API is supported only for B2C tenants. For improved role and permission management, we recommend migrating to a B2B tenant. Please contact support for assistance with the migration.

GET
/identity/v2/manage/account/roleContext/{contextName}

Retrieves the Role Context for a specified Role.

This API is supported only for B2C tenants. For improved role and permission management, we recommend migrating to a B2B tenant. Please contact support for assistance with the migration.

Authorization

apikey<token>

Tenant API Key for authentication

In: query

apisecret<token>

Tenant API Secret for authentication

In: query

Path Parameters

contextName*string

Name of the Role Context

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://api.loginradius.com/identity/v2/manage/account/roleContext/Home"
{
  "Data": [
    {
      "RoleContext": {
        "Context": "school",
        "Roles": [
          "Admin",
          "Student"
        ],
        "AdditionalPermissions": [
          "read",
          "write"
        ],
        "Expiration": "2024-05-14T12:34:56.789Z"
      },
      "Uid": "12345",
      "LastLoginDate": "2025-05-14T12:34:56.789Z",
      "FullName": "John Doe",
      "ImageUrl": "https://example.com/avatar.jpg",
      "SecondFactorAuthentication": {
        "GoogleAuthenticator": {
          "IsVerified": true,
          "IsEnabled": true,
          "SecondFactor": "TOTP"
        },
        "OTPAuthenticator": {
          "IsVerified": true,
          "IsEnabled": true,
          "SecondFactor": "TOTP"
        },
        "EmailOTPAuthenticator": {
          "IsVerified": true,
          "IsEnabled": true,
          "SecondFactor": "TOTP"
        },
        "BackUpCodes": [
          "123456",
          "654321",
          "789012"
        ],
        "Authenticator": {
          "IsVerified": true,
          "IsEnabled": true,
          "SecondFactor": "TOTP"
        },
        "PushAuthenticator": {
          "IsVerified": true,
          "IsEnabled": true,
          "PushDevice": {
            "deviceName": "Pixel 7",
            "deviceType": "Android",
            "deviceToken": "abcdef123456",
            "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn...",
            "createdAt": "2025-05-14T12:34:56.789Z"
          }
        },
        "DuoSecurityAuthenticator": {
          "IsVerified": true,
          "IsEnabled": true,
          "SecondFactor": "TOTP"
        },
        "PasskeyAuthenticator": {
          "IsVerified": true,
          "IsEnabled": true,
          "PasskeyCredential": {
            "Id": "a1b2c3d4e5f6",
            "Authenticator": "FIDO2",
            "Identifier": "user@example.com",
            "CreatedAt": "2025-05-14T12:34:56.789Z"
          }
        },
        "SecurityQuestionAuthenticator": {
          "IsVerified": true,
          "IsEnabled": true,
          "SecondFactor": "TOTP"
        }
      },
      "Email": [
        {
          "Type": "primary",
          "Value": "user@example.com"
        }
      ]
    }
  ]
}

{
  "ErrorCode": 1207,
  "Message": "API signature is missing",
  "Description": "The request is missing the API signature, please use a valid API signature parameter in order to process this request."
}

{
  "ErrorCode": 902,
  "Message": "The API secret is unauthorized",
  "Description": "The provided LoginRadius API secret is invalid or is not authorized, please use a valid or authorized LoginRadius API secret or check the API secret for your LoginRadius account."
}

{
  "ErrorCode": 1133,
  "Message": "Role Context Name is not Valid.",
  "Description": "Your Role context name is not valid, please use a valid Role context name."
}