Skip to main content

Enables or disables a portal user

PUT 

https://api.iot.telenor.com/identity-access-management/domains/:id/portal-users/:portalUserId/enabled

Change a portal user's status. This determines whether a portal user can log in or not.

Request

Path Parameters

    id uuidrequired

    Identifies the domain in Keycloak.

    portalUserId uuidrequired

    Identifies the portal user.

Bodyrequired

States whether to enable or disable the portal user.

    enableduserEnabledDefinition (boolean)required

    Sets a user to active if true or inactive if false.

Responses

The portal user's status has been updated.

Response Headers
    Content-Location

    URL to the resource that got impacted by the request.

Authorization: oauth2

name: oAuth2type: oauth2scopes: openidflows: {
  "authorizationCode": {
    "tokenUrl": "/auth/realms/telenor-iot/protocol/openid-connect/token",
    "authorizationUrl": "/auth/realms/telenor-iot/protocol/openid-connect/auth",
    "scopes": {
      "openid": "openid"
    }
  },
  "clientCredentials": {
    "tokenUrl": "/auth/realms/telenor-iot/protocol/openid-connect/token",
    "scopes": {
      "openid": "openid"
    }
  }
}
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://api.iot.telenor.com/identity-access-management/domains/:id/portal-users/:portalUserId/enabled");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"enabled\": true\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.iot.telenor.com/identity-access-management
Auth
Parameters
— pathrequired
— pathrequired
Body required
{
  "enabled": true
}
ResponseClear

Click the Send API Request button above and see the response here!