question

Ozan Yilmaz avatar image
Ozan Yilmaz asked

How can I delete master accounts of players from specific segment?

Hello everyone,

Is there a way to delete master accounts of the players from a specific segment?

I find a solution for this, but I'm not sure if it's logical. It looks like DeleteMasterPlayerAccount API is only available for Admin API. I can call GetPlayersInSegment API to get the PlayFab IDs of the player I want (I think, it's called PlayerId in the result of GetPlayersInSegment API). Then I can do a loop to delete the master accounts synchronously. If this is logical, how much data I consume on average for 1000 players?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ozan Yilmaz avatar image
Ozan Yilmaz answered

@Junjin Chen

I think, I explained myself a bit wrong. I want to delete master accounts of some players. To define those some players, I need to use segments in order to tag the players I want to delete.

The reason I want to do this is GDPR. The players should be able to delete their accounts completely whenever they want. Deleting account manually over emails might be a hard work when the number of requests is high.

I'm thinking of making a feature in the game that gives players to delete their account. When they execute the related cloudscript function, I add a tag to their accounts (for example; the tag is "Delete"), and every month I run a task manually to delete those players' master accounts by using Admin API. In order to do this, I'm thinking of calling GetPlayersInSegment API to get all the players whose accounts are tagged as "Delete", then I will make a loop to delete those accounts by using DeleteMasterPlayerAccount API. This will also give players enough time to cancel the deletion processes of their accounts since the task will run monthly. I can show them a message when they log in in order to ask if they want to remove that "Delete" tag.

Also, I mean the pricing meters in my last question. GetPlayersInSegment API will be called one time to get all the PlayFab IDs, and DeleteMasterPlayerAccount will be called 1000 times. I'm trying to make an assumption to see what it will cost.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rick Chen avatar image Rick Chen ♦ commented ·

You can use the schedule task and Azure Function to delete the player master account. You can do that in following steps:

  1. create an Azure Function that deletes player’s master account
  2. go to [Your Game Manager]->[Players]->[Segments]
  3. check the segment that you want to delete account in, then click “Run task”.
  4. Fill in the name and add an action with type “Execute Azure Function” and select the Azure Function created previously.
  5. Click Save and run.

Calling multiple API in short period of time is not recommended. If you loop the DeleteMasterPlayerAccount API in a rapid frequency, it could get throttled.

For the question about pricing meters, according to this document: Profile Writes, DeleteMasterPlayerAccount API increase the profile writes meter.

You can check price for profile meters in this page. The price varies with the Plan.

0 Likes 0 ·
Ozan Yilmaz avatar image Ozan Yilmaz Rick Chen ♦ commented ·

Thank you.

0 Likes 0 ·
Rick Chen avatar image
Rick Chen answered

The DeleteMasterPlayerAccount API removes a master player account entirely from all titles and deletes all associated data, not just from a specific segment. A workaround to remove some players from the specific segment is:

  1. Define a tag, for example, “included”
  2. In the segment, add a filter that [Tag] [is not] [(title prefix)] [included]
  3. Use the AddPlayerTag API to add the tag “included” to players that you want to remove from the segment.

What do you mean by the data consumed for 1000 players? Do you mean the pricing meters consumed by calling that many APIs?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.