Getting error when trying to use Assume-User functionality to fetch the data of all users.
The Admin account is unable to fetch data for other users incase of the developer account. When we try to use the Assume-User functionality to fetch data by impersonating other users, with the help of an admin account and Oauth2 session, we get the following error.
{
"errorCode": 1030,
"message": "You are unable to assume the user specified.",
"refId": "ynvxse"
}
1. Can you please confirm inorder to fetch the other user's data should we use "Oauth2" mechanism or "API Token" or both?
2. Currently we are using developer/trial account for analysis, since we are unable to create API Token could you please tell us if Assume-User functionality could be used in this case?
Answers
-
Hi @Reshma R
I think the issue you're facing with the Smartsheet API error "You are unable to assume the user specified" is due to limitations with developer/trial accounts.
Assuming another user:
- Use an API token generated from an Admin account with the "Assume User" header specifying the target user's email address.
Smartsheet API Doc
Allows an admin to act on behalf of, or impersonate, the user to make API calls. You might do this to troubleshoot a user problem or cover for vacations and sick time. As with cURL, the email address used to identify the user must be URI-encoded.
An admin cannot impersonate another admin.
NOTE: You must manually generate a token to assume user.
Oauth2 Access Scopes limitation
No “Admin” nor "Assume User" Scope: There is no specific scope listed for assuming another user's identity. The available scopes focus on data access, administrative tasks, and content creation/management. So, use OAuth2 for regular user authentication within your application.
Sample code assuming user:
The Python code updates the title of the first column, assuming the user.
smartsheet_client.assume_user("jane.doe@smartsheet.com")
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 63 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives