機械翻訳について

ユーザーの無効化

ユーザーが組織を離れたか、アクティブなユーザーのリストに所属する必要がなくなった場合は、そのユーザーを無効にできます。 このユースケースでは、特定のユーザーを識別および無効化する方法について学習します。 ユーザー名を使用して一意のユーザーIDを取得し、そのIDを使用してユーザーを無効にします。

  1. cURLおよびeqフィルタ・パラメータをusernameフィールドとともに使用して、特定のユーザーを検索します。 この例では、問い合せたユーザー名はCUST_CONTRACT_MGR_OPERATIONSです。
    curl -i -u "<username>:<password>" -X GET https://servername.fa.us2.oraclecloud.com/hcmRestApi/scim/Users?filter=username eq "CUST_CONTRACT_MGR_OPERATIONS"

    応答ペイロードのサンプル

    {
      "itemsPerPage": 1,
      "startIndex": 1,
      "Resources": [
        {
          "id": "5A25572D96277A00C0547E3A715EF682",
          "meta": {
            "created": "2009-05-25 00:00:00.000",
            "lastModified": "2015-12-14 10:15:48.291",
            "location": "https://servername.fa.us2.oraclecloud.com/hcmRestApi/scim/Users/5A25572D96277A00C0547E3A715EF682"
          },
          "schemas": [
            "urn:scim:schemas:core:2.0:User"
          ],
          "userName": "CUST_CONTRACT_MGR_OPERATIONS",
          "name": {
            "familyName": "Black",
            "givenName": "Sophie"
          },
          "displayName": "Sophie Black",
          "emails": [
            {
              "value": "CUST_CONTRACT_MGR_OPERATIONS@dummy.oracle.com",
              "type": "W",
              "primary": true
            }
          ],
          "roles": [
            {
              "id": "4EB6B72643872425B6BE573B531ABC6B",
              "value": "OKC_CUSTOMER_CONTRACT_MANAGER_VISION_OPERATIONS_DATA",
              "displayName": "Customer Contract Manager - Vision Operations",
              "description": "Customer Contract Manager for Vision Operations"
            },
            {
              "id": "40C4AE052EC2582286A6A0FB1514656C",
              "value": "ORA_PER_EMPLOYEE_ABSTRACT",
              "displayName": "Employee",
              "description": "Identifies the person as an employee."
            },
            {
              "id": "05E9F3576995F83E74EB3818FDCA8639",
              "value": "ORA_PER_LINE_MANAGER_ABSTRACT",
              "displayName": "Line Manager",
              "description": "Identifies the person as a line manager."
            }
          ],
          "active": true
        }
      ]
    }
    問合せによって返されるユーザーIDは5A25572D96277A00C0547E3A715EF682です。
  2. レスポンスから取得したユーザーID 5A25572D96277A00C0547E3A715EF682のPATCHリクエストを送信して、ユーザーのactiveステータスをtrueからfalseに変更し、そのユーザーを無効にします。
    curl -i -u "<username>:<password>"  -H "Content-Type: application/json"  -X PATCH  
    -d {
    "schemas":[
          "urn:scim:schemas:core:2.0:User"
         ],
         "active":false
    }
    https://servername.fa.us2.oraclecloud.com/hcmRestApi/scim/Users/5A25572D96277A00C0547E3A715EF682
    
ユーザーCUST_CONTRACT_MGR_OPERATIONSは無効であり、アクティブなユーザーのリストには表示されません。