Hello folks,
I would like to automate the process of removing access to each product according to the user's last active date. (The automation process is implemented with Google apps script.)
https://developer.atlassian.com/cloud/admin/organization/user-last-active-dates/
I was able to get the user's last active date by following the steps in the link above, but it seems that it can also get the last active of some products that has already been deleted.
So, in order to make a list of users whose access is to be removed by product, I think we need to put in a process to check if the user has access to each product.
https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v1-orgs-orgid-users-get
Using this API, it seems that we can get "product_access".
There is no error, but the data content is empty and no information could be retrieved.
{ data: [], links: { self: 'https://api.atlassian.com/admin/v1/orgs/{orgid}/users' } }
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get
Using this API, I was able to get users information, but there was no "product_access" information in it.
How can we solve this problem?
Thank you,
same problem ...
But then I checked in the managed accounts(go admin menu > Directory > Managed accounts menu) menu, and it says
access was not set.
I'm guessing that if you allow access for each application, there will be a product access value.
Hi there. APIs can sometimes be complex to work with ... You could double-check that you're using the correct API endpoints for retrieving user information and product access. The links you provided seem accurate, but make sure they are correctly integrated within your Google Apps Script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply.
The API for 'https://api.atlassian.com/admin/v1/orgs/{orgId}/users' returns 200, so I don't think that is the problem.
https://community.atlassian.com/t5/Jira-questions/Atlassian-Admin-API-not-returning-list-of-Users-in-Postman/qaq-p/1902096
↑This seems to be a similar question, but it seems to be guided to a different API and not a fundamental solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the late reply, was on sick leave.
Hm, are you sure your script is using the correct authentication method (e.g., OAuth, API token) @Sam ? Confirm that it has the required scopes to access user and product data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.