All URIs are relative to https://localhost:9200/graph, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| userCreateAppRoleAssignments() | POST /v1.0/users/{user-id}/appRoleAssignments | Grant an appRoleAssignment to a user |
| userDeleteAppRoleAssignments() | DELETE /v1.0/users/{user-id}/appRoleAssignments/{appRoleAssignment-id} | Delete the appRoleAssignment from a user |
| userListAppRoleAssignments() | GET /v1.0/users/{user-id}/appRoleAssignments | Get appRoleAssignments from a user |
userCreateAppRoleAssignments($user_id, $app_role_assignment): \OpenAPI\Client\Model\AppRoleAssignmentGrant an appRoleAssignment to a user
Use this API to assign a global role to a user. To grant an app role assignment to a user, you need three identifiers: * principalId: The id of the user to whom you are assigning the app role. * resourceId: The id of the resource servicePrincipal or application that has defined the app role. * appRoleId: The id of the appRole (defined on the resource service principal or application) to assign to the user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new OpenAPI\Client\Api\UserAppRoleAssignmentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$user_id = 'user_id_example'; // string | key: id of user
$app_role_assignment = new \OpenAPI\Client\Model\AppRoleAssignment(); // \OpenAPI\Client\Model\AppRoleAssignment | New app role assignment value
try {
$result = $apiInstance->userCreateAppRoleAssignments($user_id, $app_role_assignment);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserAppRoleAssignmentApi->userCreateAppRoleAssignments: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string | key: id of user | |
| app_role_assignment | \OpenAPI\Client\Model\AppRoleAssignment | New app role assignment value |
\OpenAPI\Client\Model\AppRoleAssignment
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userDeleteAppRoleAssignments($user_id, $app_role_assignment_id, $if_match)Delete the appRoleAssignment from a user
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new OpenAPI\Client\Api\UserAppRoleAssignmentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$user_id = 'user_id_example'; // string | key: id of user
$app_role_assignment_id = 'app_role_assignment_id_example'; // string | key: id of appRoleAssignment. This is the concatenated {user-id}:{appRole-id} separated by a colon.
$if_match = 'if_match_example'; // string | ETag
try {
$apiInstance->userDeleteAppRoleAssignments($user_id, $app_role_assignment_id, $if_match);
} catch (Exception $e) {
echo 'Exception when calling UserAppRoleAssignmentApi->userDeleteAppRoleAssignments: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string | key: id of user | |
| app_role_assignment_id | string | key: id of appRoleAssignment. This is the concatenated {user-id}:{appRole-id} separated by a colon. | |
| if_match | string | ETag | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userListAppRoleAssignments($user_id): \OpenAPI\Client\Model\CollectionOfAppRoleAssignmentsGet appRoleAssignments from a user
Represents the global roles a user has been granted for an application.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new OpenAPI\Client\Api\UserAppRoleAssignmentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$user_id = 'user_id_example'; // string | key: id of user
try {
$result = $apiInstance->userListAppRoleAssignments($user_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserAppRoleAssignmentApi->userListAppRoleAssignments: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string | key: id of user |
\OpenAPI\Client\Model\CollectionOfAppRoleAssignments
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]