Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by Preston Phillips · Feb 10, 2021 at 08:48 PM · Player Dataunity3dAccount ManagementmultiplayerTitle Data

1 xbox account linked to 2 playfab master accounts and unique names

Hi,
We're currently using Playfab for online functionality between Win10 store and Xbox. As such we are logging into Playfan using an Xbox token. Once logged in we set the users display name to the Xbox gamertag name to allow us to get the name of the players we join since we've not found a way to do this through the Microsoft GDK.
Our problem is that when a player logs in on PC and then on Xbox it seems to create separate Playfab 'Master player accounts' for them both with the same linked xbox live account. This means when we try to set the display name we get an error because the name is no longer unique and has been taken by the other master player from the PC sotre login.
Should our solution be to enable non-unique usernames in the Playfab title settings or is there a better way for us to handle this scenario?
For reference our login properties are:

var request = new PlayFab.ClientModels.LoginWithXboxRequest();
request.CreateAccount = true;
request.XboxToken = XboxToken;
request.InfoRequestParameters = new PlayFab.ClientModels.GetPlayerCombinedInfoRequestParams();
request.InfoRequestParameters.GetPlayerProfile = true;
request.TitleId = titleID;
PlayFab.PlayFabClientAPI.LoginWithXbox(request, OnPlayfabLogin, OnPlayfabFailed);

If we are using the display name correctly but are not to enable non-unique usernames how should we handle the situation where a user changes their gamer tag and another user takes their old freed gamer tag? If they try to play before the original user updates their display name it will flag as not unique.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Feb 10, 2021 at 08:50 PM

Actually, the reason two different player account were created is because those two sign-ins were from different Xbox Live Sandboxes. I found an example of two player accounts in your game that were in this state. One originated from Sandbox ZJHDMN.99, while the other was from ZJHDMN.0. For a live game, all sign-ins would be coming from Xbox Live Production, which is a single sandbox. So regardless of the client device, a single Xbox Live player would always sign into the same PlayFab account.

Comment
Preston Phillips

People who like this

1 Show 4 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Preston Phillips · Feb 11, 2021 at 10:51 AM 0
Share

Ok so we should leave the name settings as they are and clear the accounts created in sandboxes.
What about handling users that change gamer tags to tags that have been used by other users in the past?

avatar image Brendan ♦♦ Preston Phillips · Feb 12, 2021 at 03:29 AM 1
Share

Ah, right - sorry, I should have addressed the overall use case, as well.

My quick take on it would be that I wouldn't copy the Gamertag to the DisplayName unless you have a very specific need for that, and you're okay with turning on the non-unique DisplayName option (making it no longer a searchable element). While you could just check the Gamertag on login and change the DisplayName if it has changed, that wouldn't help for the case where someone changes their Gamertag but then doesn't sign in to the title after that. You can get the Gamertag as part of a call to get the player's account info, so you can still access it.

Technically, knowing that Gamertags are unique, you could have an Azure Functions Cloud Script that you run to set the user's DisplayName, and which does the query for the player that currently has the DisplayName matching the Gamertag if one exists, forcibly changing that one to a randomly generated ID. But I'd like to make sure it's worth you going to that trouble, first. What's your specific use case?

avatar image Preston Phillips Brendan ♦♦ · Feb 12, 2021 at 10:52 AM 0
Share

We are currently just using the display name as a way to get the other players gamer tags to show in game. We get the account info in order to get the other users xbox ID but can't find a way to get their gamer tag using GDK and that ID so ended up using the display name as a quick solution.

We don't do anything fancy and don't search for accounts using display names so setting the non unique is an option but if there is a better way prefer to use it.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Deleted players but the players are still there... 1 Answer

    Integrate my own server with Playfab's Multiplayer system 1 Answer

    How to create sub-account and update Player Data (Title)? 1 Answer

    Players not deleted 2 Answers

    Segments: What is the best way to grant reward for users who spend 1hr a day for a week using segments? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges