[Halted] Upcoming changes that impact getting and setting memberships and access levels

Previously I’ve asked what the right way would be to list all teams a specific user is a member of, is this one of the use cases that have been missing? Or is this already possible with the current interface?

Main reason I am asking is because if it is already possible, I would like to put it on our backlog to get fixed ASAP. Otherwise we’ll have to wait till the new feature is available.

That being said, thank you for pausing and listening :pray:t2:

It’s missing. :grimacing:

1 Like

Is anyone else having issues with the new_goal_memberships in the Asana-Enable header not silencing deprecation logs?

I’m using the PHP Asana SDK via Composer package management (asana/asana v0.10.2). I’ve always been able to simply add the value to the header and immediately see the error logs cease. Just last week, I saw the correct behavior when adding new_memberships to my Asana-Enable header. This leads me to think it isn’t a bug in my code.

I have the same problem right now. It look likes someone changes ‘new_memberships’ into ‘new_goal_memberships’. I hope Asana can revert this changed key?

Hey folks,

looking into that issue for you. Can you please clarify exactly what API request you are sending, and what headers you’re including? Please be mindful about not accidentally posting any bearer token headers.

1 Like

Hi folks, we’ve relaunched this as a more targeted migration. Most folks will not be affected for the moment. You can read more about it here: [Launched] Team-Sharing for Goals

1 Like

@sasha_f Thank you for the quick investigation and action!

I just tested more thoroughly to track down the exact Asana client call that was causing the issue, and happily discovered an unexpected situation in my code!

The problem was that I had a specific function to load an Asana client for all cases that was not actually being used in some areas!

In my own get_client() function, I’d used the correct Asana-Enable headers:

$asana = \Asana\Client::accessToken(
	$asana_personal_access_token,
	[
		'headers' => [
			'asana-enable' => 'new_user_task_lists,new_project_templates,new_memberships,new_goal_memberships',
		],
	]
);

…where in other locations in my code, I was apparently loading a client raw, without using my helper function, which didn’t include the same headers: :woman_facepalming:

$asana = \Asana\Client::accessToken( $asana_personal_access_token );

I apologize for the confusion! :bowing_woman:

For completeness, the client call that was logging the PHP Warning: This request is affected by the "new_goal_memberships" deprecation. is the following:

$me = $asana->users->me();
1 Like

See if this is it. I’m coming to the party late so I don’t know if it’s been there all along or if they’ve added it recently.

https://app.asana.com/api/1.0/memberships?member=12345&resource_subtype=team_membership&workspace=12345

@David_Hess1,

The rollout of the memberships endpoint has been halted and is being re-thought within Asana. It’s now being rolled out slowly, for one object at a time. See [Launched] Team-Sharing for Goals

I had just migrated my portfolio membership code last month to use the new memberships endpoint to prevent outages in my service in anticipation of the coming deprecation. Today my code broke because the memberships endpoint no longer recognizes portfolio memberships.

This request used to work when getting memberships for the parent portfolio:

curl --location 'https://app.asana.com/api/1.0/memberships?parent=1185555174593555' \
--header 'Asana-Enable: new_memberships,new_goal_memberships' \

As of today, this is the response I get:

asana.error.InvalidRequestError: Invalid Request: The 'parent' query param must be a Goal.

I reverted my code to use the dedicated portfolio membership endpoints, like add member and it is working as expected again.

@sasha_f I’m assuming this is because the memberships migration has been halted and only the goals memberships are being supported for now? If so, do you know when we should expect the portfolio memberships to be incorporated back into the new memberships endpoint?

Hey @colin_mckibben_lr, we don’t have a timeline for re-addition yet. But I will update this thread and also create a new one when we have more details to share. Keep an eye out for new Asana-Change headers for this. We will give notice reasonably in advance of when these changes will become available, and even more notice before they become mandatory.

1 Like

Does the above JSON need to be passed as the “data” parameter in the POST body of the request? Also, which URL should this data be POSTed to? Is it https://app.asana.com/api/1.0/memberships/<<membership_GID>>?