📘

Accessing SCIM endpoints

Only Service Accounts in Enterprise Domains can access SCIM endpoints.

Asana supports SCIM 2.0 operations at https://app.asana.com/api/1.0/scim. Okta provides documentation for understanding SCIM.


Service provider configuration endpoints

HTTP methodAPI endpointAsana behavior
GET/ServiceProviderConfigRead-only meta information.
GET/ResourceTypesRead-only meta information.
GET/SchemasRead-only meta information.

User endpoints

HTTP methodAPI endpointAsana behavior
GET/UsersReturn full list of users in the domain. Does not return Asana guest users.
The accepted query parameters are:
1. filter for userName.
GET/Users/:idReturn specific user in the domain. Does not return Asana guest users.
POST/UsersCreate a new user if the User does not exist.
PUT/Users/:idUpdate / remove attributes for a User. Deprovision user (zombify) in Asana if active=false.
PATCH/Users/:idAdd / update attributes for a user. Deprovision user (zombify) in Asana if active=false.
DELETE/Users/:idDeprovision user (zombify) in Asana.

Accepted attributes

AttributeTypeInfo
userNamestringUnique identifier for the user, typically used by the user to directly authenticate to the service provider. Each user MUST include a non-empty userName value, and it must be an email address. Required.
namecomplexThe user's name.
name.givenNamestringUnsupported for PATCH request, use name.formatted.
name.familyNamestringUnsupported for PATCH request, use name.formatted.
name.formattedstringThe full name of the user.
emailsmulti-valued complexEmail addresses for the user.
email.valuestringEmail address for the user.
email.primarystringWhether this email address is the preferred email address for this user. true may only appear once for this attribute.
activebooleanIndicates whether the user's account is active in Asana.
titlestringThe user's title, such as "Vice President".
preferredLanguagestringThe user's preferred language. Used for selecting the localized User interface.
addressesmulti-valued complexThe user’s address.
address.countrystringThe user’s country.
address.regionstringThe user’s region.
address.localitystringThe user’s city.
phoneNumbersmulti-valued complexThe user’s phone.
phoneNumber.valuestringThe user’s phone number value.
"urn:ietf:params:scim:<br>schemas:extension:enterprise:<br>2.0:User"complexThe Enterprise User Schema Extension attribute.
"urn:ietf:params:scim:<br>schemas:extension:enterprise:<br>2.0:User.department"stringThe department the user belongs to.
"urn:ietf:params:scim:<br>schemas:extension:enterprise:<br>2.0:User.costCenter"stringThe cost center user belongs to.
"urn:ietf:params:scim:<br>schemas:extension:enterprise:<br>2.0:User.organization"stringThe organization user belongs to.
"urn:ietf:params:scim:<br>schemas:extension:enterprise:<br>2.0:User.division"stringThis metadata field indicates which division that the user belongs to. Note: In this context, division is an organizational construct, and is distinct from the Asana division concept. As such, this metadata can be used to help reflect organizational structure in Asana (e.g., division, organization, department, cost center, etc.).
"urn:ietf:params:scim:<br>schemas:extension:enterprise:<br>2.0:User.employeeNumber"stringA string identifier, typically numeric or alphanumeric, assigned to a person.
"urn:ietf:params:scim:<br>schemas:extension:enterprise:<br>2.0:User.manager"complexThe user’s manager.
"urn:ietf:params:scim:<br>schemas:extension:enterprise:<br>2.0:User.manager.value"stringThe user’s manager’s user ID.

Examples

Request: GET https://app.asana.com/api/1.0/scim/Users?filter=userName eq "[email protected]"

Response: 200 OK

{
    "Resources": [
        {
            "id": "1",
            "name": {
                "familyName": "John",
                "givenName": "Smith",
                "formatted": "John Smith"
            },
            "userName": "[email protected]",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true,
                    "type": "work"
                }
            ],
            "active": true,
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:User",
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
            ],
            "title": "Software Engineer",
            "addresses": [
                {
                    "locality": "Vancouver",
                    "region": "BC",
                    "country": "CA",
                    "type": "work",
                    "primary": true
                }
            ],
            "phoneNumbers": [
                {
                    "value": "111-111-1111",
                    "type": "work",
                    "primary": true
                }
            ],
            "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                "department": "R&D",
                "costCenter": "CC_ID",
                "organization": "Asana",
                "division": "Product",
                "employeeNumber": "ID1",
                "manager": {
                    "value": "2",
                }
            }
        }
    ],
    "totalResults": 1,
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ]
}
Request: POST https://app.asana.com/api/1.0/scim/Users

{
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
    ],
    "userName": "[email protected]",
    "name": {
        "formatted": "John Smith"
    },
    "emails": [
        {
            "primary": true,
            "value": "[email protected]"
        }
    ],
    "active": true,
    "title": "Software Engineer",
    "preferredLanguage": "en",
    "addresses": [
        {
            "locality": "Vancouver",
            "region": "BC",
            "country": "CA"
        }
    ],
    "phoneNumbers": [
        {
            "value": "111-111-1111"
        }
    ],
    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
        "department": "R&D",
        "costCenter": "CC_ID",
        "organization": "Asana",
        "division": "Product",
        "employeeNumber": "ID1",
        "manager": {
            "value": "2",
        }
    }
}

Response: 201 Created

{
    "id": "1",
    "name": {
        "familyName": "John",
        "givenName": "Smith",
        "formatted": "John Smith"
    },
    "userName": "[email protected]",
    "emails": [
        {
            "value": "[email protected]",
            "primary": true,
            "type": "work"
        }
    ],
    "active": true,
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
    ],
    "title": "Software Engineer",
    "preferredLanguage": "en",
    "addresses": [
                {
                    "locality": "Vancouver",
                    "region": "BC",
                    "country": "CA",
                    "type": "work",
                    "primary": true
                }
            ],
            "phoneNumbers": [
                {
                    "value": "111-111-1111",
                    "type": "work",
                    "primary": true
                }
            ],
            "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                "department": "R&D",
                "costCenter": "CC_ID",
                "organization": "Asana",
                "division": "Product",
                "employeeNumber": "ID1",
                "manager": {
                    "value": "2",
                }
            }
}
Request: PATCH https://app.asana.com/api/1.0/scim/Users/1

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "replace",
            "value": {
                "title": "Senior Software Engineer"
            }
        }
    ]
}

Response: 200 OK

{
    "id": "1",
    "name": {
        "familyName": "John",
        "givenName": "Smith",
        "formatted": "John Smith"
    },
    "userName": "[email protected]",
    "emails": [
        {
            "primary": true,
            "value": "[email protected]",
            "type": "work"
        }
    ],
    "active": true,
    "preferredLanguage": "en",
    "title": "Senior Software Engineer",
    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
        "department": "R&D"
    },
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
    ]
}


Group endpoints

SCIM Groups are equivalent to Asana teams.

HTTP methodAPI endpointAsana behavior
GET/GroupsReturn full list of team in the domain, including private team.
The accepted query parameters are:
1. filter for displayName.
GET/Groups/:idReturn a specific team in the domain.
POST/GroupsCreate a new team.
PUT/Groups/:idReplace the team's attributes.
PATCH/Groups/:idUpdate the team's attributes.

Accepted attributes

AttributeTypeInfo
displayNamestringUnique identifier for the team. Required.
membersmulti-valued complexThe members of the team.
members.valuestringThe team member's user ID.

Examples

Request: GET https://app.asana.com/api/1.0/scim/Groups?filter=displayName eq "Marketing"

Response: 200 OK

{
    "Resources": [
        {
            "id": "1",
            "displayName": "Marketing",
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:Group"
            ],
            "meta": {
                "resourceType": "Group"
            }
        }
    ],
    "totalResults": 1,
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ]
}
Request: POST https://app.asana.com/api/1.0/scim/Groups

{
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
    ],
    "displayName": "Marketing",
    "members": [
        {"value": "1"},
        {"value": "2"}
    ]
}

Response: 201 Created

{
    "id": 1,
    "displayName": "Marketing",
    "members": [
        {"value": "1"},
        {"value": "2"}
    ],
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
    ],
    "meta": {
        "resourceType": "Group"
    }
}
Request: PATCH https://app.asana.com/api/1.0/scim/Groups/1

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "add",
            "path": "members",
            "value": [
                {
                    "value": "3"
                }
            ]
        }
    ]
}

Response: 204 No Content