Asana: Possibility to bookmark users tasks - asana

I would like to add link from mine application to users tasks in asana.
What I found out asana has a following URL for user tasks:
https://app.asana.com/0/{SOME_ID}/{SOME_ID}
Unfortunately SOME_ID is not a user id, but it is something different.
Is there a possibility to get this ID (SOME_ID) through asana rest API ?
And what exactly SOME_ID means ?

The first ID represents the the user's "Assigned to me" project, which we don't actually expose in the API currently. If you want to get the tasks assigned to a user in a workspace, you can GET /tasks?workspace=X&assignee=X.

Related

Query to pulled data using Microsoft graph

I never use Microsoft graph. I just want to query to just pull a selection of users by supervisor using Microsoft graph
Run https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/directReports
See reference
Create SPFx to call graph api to get users.
the demo had shared how to search/filter users, to get all users, just remove the filter logic.
https://graph.microsoft.com/v1.0/users?$select=displayName,mail,userPrincipalName
This should work, if you want to get specific user with given email ID. Just change your email ID. The email ID I have given is just an example.
https://graph.microsoft.com/v1.0/users/xyz#mail.com?$select=displayName

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.

Asana API: organization_exports

How do I get organization ID? I tried this:
https://app.asana.com/api/1.0/organization_exports
But it returns
{"errors":[{"message":"Not Found","help":"For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"}]}
Of course I'm logged in, or use an access token, and other API calls work fine.
My final goal is to make use of the organization ID in https://github.com/Asana/export_importer.
sorry for the delay - the system that was supposed to alert us to your question didn't pick this one up.
The easiest way to get the organization ID is to query our API for your user to see what organizations you're a member of, rather than use the organization_exports endpoint - that's for exporting a full organization data dump for backup or reporting purposes.
If you look at our API documentation for getting your user at app.asana.com/api/1.0/users/me, you'll see that your user record returns a list of workspaces which have ID and name information. This is probably the most straightforward way to get your organization ID from our API.

Asana - Get list of Projects that a user has access to?

I am coding an "Asana Post" program but I need to give the user the option to choose the Project to post the task to.
But obviously, I can't offer the user to post to all projects as they may not be a member of all of them.
The only option that I see in the API is to pull all the projects with their Team IDs and then to pull all the Users for that Team and check if he is a member.
That seems very tedious.
Any other ideas?

Find all users of all projects with Jira API

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

Resources