Connecting with Service Account giving oAu

I had our Asana admin set me up with a service account. He provided me with the access token and I’m trying to use it to connect to the API, but I’m getting errors related to Oauth. For example, to simply list the projects in one of our workspaces I’m connecting to[workspaceid]/projects
And setting the Bearer Token to the service account token.
But I get a 403 error “One of the following OAuth scopes must be present to use this endpoint: default”
Do I need to change the way I authenticate? The documentation goes on about Oauth authentication but lists service accounts as a completely seperate way to authenticate so I assume I don’t have to go through the whole Oauth process using service accounts. Am I wrong?

Hi @Brian_Lorraine ,

Welcome to the forum! I believe Asana recently made a change to service accounts that allows you to set the scope of access for them during creation (either full access or partial access currently related to SCIM). Could you check with your admin to see if they configured the service account with full acces?

Hi @Brian_Lorraine ,

I think what @Stephen_Li mentioned is likely to be the issue. We recently introduced the ability to limit service account access to SCIM endpoints (we’ll introduce more in the coming months). More information on that here.

Your admin can check the list of tokens to see what permissions are on it. To access this endpoint, they will need to create a token with “Full permissions”.

Hope this helps, and thanks for posting. We’ll look at ways to make this more clear.



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.