Get portfolios a user it not the owner of

Hi team, hi @Joe_Trollo

In the API documentation for Portfolios, it says “Currently, API users can only get a list of portfolios that they themselves own”. Any idea if this is going to change soon and/or if there is a way around it?

Thanks!

cc @Adrian_Aguayo @Phil_Seeman

2 Likes

Actually @Joe_Trollo already answered.

In this post Python API - Getting Project IDs from Portfolios, Locked out of other portfolios - #2 by Mahmudul_Hasan

3 Likes

@Bastien_Siebman: I assume this is no longer valid as memberships were introduced to portfolio meanwhile.

2 Likes

Not sure @Joe_Trollo?

If you query portfolios directly via GET /portfolios then the only filtering we support is by portfolio owner. However, if you query portfolio memberships via GET /portfolio_memberships then you can query for any portfolios that any particular user is a member of.

1 Like

I don’t understand how that would allow me to get all portfolios a member is allowed to see, and not just the one is the owner of…

I should start by clarifying that “portfolios you can see” and “portfolios you’re a member of” are not the same thing, similar to how you can see projects in Asana but not be a member of them.

If you want to see all portfolios a user is a member of, you can make a query like GET /portfolio_memberships?workspace=<workspace-gid>&user=<user-id>&opt_fields=portfolio.

2 Likes

It works perfectly, thanks a lot.