Duo Alias API
The Duo Alias API allows for addition and removal of aliases within the Duo Console. For information on how aliases work in Duo, see the Duo documentation.
Add Alias
Endpoint: https://duo-alias.identity.tamu.edu/api/add
HTTP Method: POST
Authentication Required: Yes
Authentication: Include the x-api-key
header provided by Identity Security.
Request Body Format:
{
"netid":"[string]",
"alias":"[string]"
}
Example:
{
"netid":"john.smith",
"alias":"jsmith"
}
Successful Response
Condition: New alias was successfully added to the account.
Code: 200
Content: Alias {alias} added for user {user}.
Error Responses
Code | Condition | Content: |
---|---|---|
401 | x-api-key not authorized. | API key not authorized |
404 | Unable to find user account in Duo. | Failed to get user info from Duo. |
500 | Failed to add new alias within Duo. | Failed to add new alias. |
Remove Alias
Endpoint: https://duo-alias.identity.tamu.edu/api/remove
HTTP Method: POST
Authentication Required: Yes
Authentication: Include the x-api-key
provided by Identity Security.
Request Body Format:
{
"netid":"[string]",
"alias":"[string]"
}
Example:
{
"netid":"john.smith",
"alias":"jsmith"
}
Successful Response
Condition: New alias was successfully added to the account.
Code: 200
Content: Alias {alias} removed for user {user}
.
Error Responses
Code | Condition | Content |
---|---|---|
401 | x-api-key not authorized. | API key not authorized. |
500 | Requested user has no existing aliases, or failed to remove aliases. | User has no aliases. or Failed to remove alias. |