Guest Users APIs
Get Accounts (GET)
Return all account assigned for the given provider
Route
|
URI |
/api/v1/GuestUsers |
|
Method |
GET |
|
Result |
JSON – IActionResult |
Parameters
None
Example
GET http://localhost/api/v1/GuestUsers
Remove Guest User (DELETE)
Remove the user from active directory.
Route
|
URI |
/api/v1/GuestUsers/{system}/{resourcetype}/{id} |
|
Method |
DELETE |
|
Result |
JSON – IActionResult |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
system |
string |
Yes |
|
|
resourcetype |
string |
Yes |
|
|
id |
string |
Yes |
|
Example
DELETE http://localhost/api/v1/GuestUsers/{system}/{resourcetype}/{id}
Get Account By Id (GET)
Return the particular account assigned for the given provider
Route
|
URI |
/api/v1/GuestUsers/{system}/{resourcetype}/{id} |
|
Method |
GET |
|
Result |
JSON – IActionResult |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
system |
string |
Yes |
|
|
resourcetype |
string |
Yes |
|
|
id |
string |
Yes |
|
Example
GET http://localhost/api/v1/GuestUsers/{system}/{resourcetype}/{id}
Add Group Member (POST)
The guest users can be added to certain groups.
Route
|
URI |
/api/v1/GuestUsers/{system}/{resourcetype}/{id}/Attributes/groupid |
|
Method |
POST |
|
Result |
JSON – IActionResult |
Request Payload
GroupMemebershipArguments object:
|
Property |
Type |
Mandatory |
Description |
|---|---|---|---|
|
UriKey |
string |
Yes |
|
|
GuestuserId |
string |
Yes |
|
|
GroupAccountId |
string |
Yes |
|
|
Comment |
string |
Yes |
|
|
ExecutionDate |
string |
Yes |
An optional execution date. |
Example
POST http://localhost/api/v1/GuestUsers/{system}/{resourcetype}/{id}/Attributes/groupid Content-Type: application/json
{
"UriKey": "sample",
"GuestuserId": "sample",
"GroupAccountId": "sample",
"Comment": "sample",
"ExecutionDate": "sample"
}
Remove Group Member (DELETE)
Remove the Guest user from group.
Route
|
URI |
/api/v1/GuestUsers/{system}/{resourcetype}/{id}/Attributes/groupid |
|
Method |
DELETE |
|
Result |
JSON – IActionResult |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
system |
string |
Yes |
|
|
resourcetype |
string |
Yes |
|
|
id |
string |
Yes |
|
Example
DELETE http://localhost/api/v1/GuestUsers/{system}/{resourcetype}/{id}/Attributes/groupid
Remove User Role (DELETE)
Remove the Azure Active Directory user role from the guest user.
Route
|
URI |
/api/v1/GuestUsers/{system}/{resourcetype}/{id}/Attributes/userroleid |
|
Method |
DELETE |
|
Result |
JSON – IActionResult |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
system |
string |
Yes |
|
|
resourcetype |
string |
Yes |
|
|
id |
string |
Yes |
|
Example
DELETE http://localhost/api/v1/GuestUsers/{system}/{resourcetype}/{id}/Attributes/userroleid
Add User Role (POST)
Assign the Azure Active Directory user role to the guest user.
Route
|
URI |
/api/v1/GuestUsers/{system}/{resourcetype}/{id}/Attributes/userroleid |
|
Method |
POST |
|
Result |
JSON – IActionResult |
Request Payload
ModifyUserArguments object:
|
Property |
Type |
Mandatory |
Description |
|---|---|---|---|
|
UriKey |
string |
Yes |
|
|
GuestuserId |
string |
Yes |
|
|
ProviderName |
string |
Yes |
|
|
UserPrincipalName |
string |
No |
|
|
UserRoleId |
string |
Yes |
|
|
Comment |
string |
Yes |
|
|
ExecutionDate |
string |
Yes |
An optional execution date. |
Example
POST http://localhost/api/v1/GuestUsers/{system}/{resourcetype}/{id}/Attributes/userroleid Content-Type: application/json
{
"UriKey": "sample",
"GuestuserId": "sample",
"ProviderName": "sample",
"UserPrincipalName": "sample",
"UserRoleId": "sample",
"Comment": "sample",
"ExecutionDate": "sample"
}
Block Guest User (PUT)
Block the relevant guest user and restrict the user's permissions.
Route
|
URI |
/api/v1/GuestUsers/BlockGuestUser |
|
Method |
PUT |
|
Result |
JSON – IActionResult |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
data |
Required]BlockGuestUserArgument |
No |
|
Example
PUT http://localhost/api/v1/GuestUsers/BlockGuestUser