Find all users of all projects with Jira API - jira

I need to get a list of projects for currently logged in user. I found the decision of oppozite task here: JIRA SOAP API : get the list of users
Is there a way to do this through Jira API?

Do you mean which projects a user is allowed to see issues in? If so, you want to use
getPermissionSchemes to retrieve an array of RemotePermissionSchemes, then use getPermissionMappings on each of those to get the permissions that you want to see, e.g. View Issues (by id). The problem is you'd have to do this for all projects (can be cached) but then getting the roles for the user only works for the logged in user.
summary: I'd write my own SOAP method to do this

These are 2 questions:
Which users are currently logged in?
List of projects for a user?
For the first one, I found some entries in the JIRA issue tracker: Users currently logged on
The second one is easier, have a look at the API

Related

Microsoft Graph API: admin can't list other users people

Logged in as the Office 365 Global Administrator, I want to get the relevant people list for any user in Active Directory.
I can get my calls to return using
https://graph.microsoft.com:443/v1.0/users('my.address#contoso.com')/people
and
https://graph.microsoft.com:443/v1.0/users/{the user id}/people
and
https://graph.microsoft.com:443/v1.0/users('{the user id}')/people
and
https://graph.microsoft.com:443/v1.0/users/my.address#contoso.com/people
but, as an Office 365 admin with People.Read.All consent in the app, the call only returns one person (the target user's profile) for any user but myself. If I call it for my user I get a list of ten people
If I log in as that other person and make the People List API call it returns the expected ten results.
JWT scope: "scp": "Files.ReadWrite Mail.Send People.Read.All User.Read
I have to change the scope to People.Read for the non-admin.
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_people
the call only returns one person (the target user's profile) for any
user but myself.
Answer is in the API Doc. As the document says.
Retrieve a collection of person objects ordered by their relevance to
the user, which is determined by the user's communication and
collaboration patterns and business relationships.
The following request gets the people most relevant to another person in the signed-in user's organization
https://graph.microsoft.com:443/v1.0/users('my.address#contoso.com')/people
It might happen that there is no one relevant to that user.
If you want the list of contacts in other user's contact list then you can refer to this one :
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_contacts
UPDATE
https://developer.microsoft.com/en-us/graph/graph-explorer
I used the demo account on this website. I used this query
https://graph.microsoft.com/v1.0/users/08fa38e4-cbfa-4488-94ed-c834da6539df/people It worked.
This query gives the same result
https://graph.microsoft.com/v1.0/users('08fa38e4-cbfa-4488-94ed-c834da6539df')/people
Same result
https://graph.microsoft.com/v1.0/users('MiriamG#M365x214355.onmicrosoft.com')/people/
Same result
https://graph.microsoft.com/v1.0/users/MiriamG#M365x214355.onmicrosoft.com/people/
If you still can't get it to work and specially on Graph Explorer Website. Then it means that according to Microsoft there are no relevant people for that particular user.
As you can see there are different ways to use the same thing. Try it all if it works. Let me know.
I am not seeing this behavior in the Graph Explorer sample tenant. The behavior seems to indicate that this is auth-related. I would try to sign in with the admin again and make sure that you've consented to any of the admin-only scopes. Additionally, one thing you can do to figure out whether you have the appropriate scope in your token is decoding the JWT and examining the "scp" collection.

MS Graph API endpoint /v1.0/me/planner/plans doesn't return all my plans

In the past I was reading a list of plans of current user with this REST call of the beta-API:
https://graph.microsoft.com/beta/me/plans
In July 2017 the planner API was released and there are also some minor changes to the endpoints, so the REST call in the V1.0-API now is:
https://graph.microsoft.com/v1.0/me/planner/plans
Unfortunately I do not receive all my plans with that endpoint. Apparently I only get plans that exist for a long time, but any newly created plans are not visible. I tried a lot of actions on my plans like subscribing to, assigning tasks to me, favorize the plan in planner hub, making a plan public or private, but nothing helps, new plans remain invisible in the API.
Can anybody explain what the new endpoint exactly does? The documentation for List plans is not very helpfull.
Can anybody explain how I can a list of all plans (title and id) that I am owner or member of?
The only work-around I have found so far is:
1) Read all unified groups
https://graph.microsoft.com/v1.0/me/memberOf/$/microsoft.graph.group?$filter=groupTypes/any(a:a eq 'unified')
2) for each group: read the planner plan for that group
https://graph.microsoft.com/v1.0/groups/<id>/planner/plans
But that would require one request per group, makeing performance horrible on tenants with dozens of groups.
This API returns plans that have been shared with the current user. Plans can be shared with a user by adding the user's id to sharedWith property of planDetails (Edit: currently users do not have permissions to add or remove others from this list). This is a separate set of users from group membership and does not allow access to data for shared users. Instead, the users will have access if they are group members, and lose access if they are removed from the group.
More information and a sample for updating plan details can be found here.
Additionally, you can submit feedback about the API (and other Planner functionality) here.

Caller not authenticated when attempting access sharepoint list using Microsoft graph

Trying to use Microsoft's Graph beta to access a Sharepoint list via a registered Azure app using a key. I'm able to successful see/access some lists(looks like only lists created when site was created), but any list I have manually created is missing.
I can do the following get to list most lists in my site:
https://graph.microsoft.com/beta/sites/contoso.sharepoint.com,fc016e3c-d8ae-4ee0-a10c-de6d26788b6a,9a4ea7a5-c3c4-44ae-9f80-273bd67431b8\lists
but for some reason it's only displaying certain lists and none of the ones I created. However if enter the list's GUID like this
https://graph.microsoft.com/beta/sites/contoso.sharepoint.com,fc016e3c-d8ae-4ee0-a10c-de6d26788b6a,9a4ea7a5-c3c4-44ae-9f80-273bd67431b8/lists/BEA4B4A9-323F-441A-BA19-806290B27EF6
I receive "the caller is not authenticated" message back. This is message has me thinking it's a permissions issue, however, my list permissions are the same on all lists. it's as if the graph api can only see lists created by the system and not by end users.
Anybody experiencing this issue?
I've seen this issue on my end. The "save item to list" function works for some accounts and not others... It's extremely weird! Typical SharePoint, I suppose.
What I've come to realize is that GRAPH will sometimes throw an error when trying to save data to a date field and works every time saving data to text fields. If I'm logged in as my main O365 account (with license) I can save to date fields. If I'm logged in with a basic user that I just created on the domain (no license) I can create items unless there's a date field.
If I come up with anything else I'll post it! Sorry, this is more of a work-around than an answer. Hopefully it will spark something else.
Thanks

How can I add guests or members to projects created through the Asana API?

I currently have a script that takes a list of people and creates new Asana projects, one for each person. These people are not in our Asana organization and need to be invited as guests to their respective projects. If I try to include a followers or members property in my API request, I get denied, and the docs list those properties as read-only.
I noticed this question from over a year and a half ago, where an Asana engineer said that it was on the API roadmap and that he hoped to publish it soon. It seems like the engineer in question no longer works at Asana, so replying to him won't help me, but has any progress been made on this front? Being able to invite guests to each project programmatically would be a huge time saver. Thanks!
We decided to keep this as a read-only endpoint. Apologies for the confusion.
You can add and remove followers on a task through the API. Perhaps you could adjust your workflow to use tasks instead of projects.

SharePoint Web Part Access Denied error

I have a list in my sharepoint site.The users who have contribute access is able to add items on the list.But recently some users who have contribute access was not able to add new item.The normal work around we do is we will add them to the owners group and ask them to login .Then we ask them to logout and remove them from the owners group and issue will be resolved.But the proper way shouldn't be like that.Please give the proper way to solve this issue.
The users whom you talk about, Were they added to the contribute group recently? May be the list is not inherting permission(?)
You can use this WebPart (http://accesschecker.codeplex.com/) to check individual acces to every list, lib etc in your SharePoint site.

Resources