# Steam friend list has not presence state in build game

**URL:** <https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, session, Blueprint, question\
**Created:** [June 22, 2024, 6:49am UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324 "2024-06-22T06:49:48Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![s0akk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@s0akk](https://forums.unrealengine.com/u/s0akk)\
**Post date:** [June 22, 2024, 6:49am UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/1 "2024-06-22T06:49:49Z")

</div>

Hello,

In the editor in standalone mode, I only see my friends who are not offline and I can see their status.  
(It’s OK)

 ![ue5_editorStandalone_](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/7/50750a43a3d8be97c186c502b0257bbc9c70b66c.png)

But when on my game build, I see all my friends and no status…  
(All state return true)  
Why?

 ![ue5_buildGame_](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/9/f097831698a45bad74e3a344cd2a43117870188f.png)

I use Advanced sessions.

 ![ue5_blueprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/b/c7ba801f83664ac407fc1ea3a90e9f9d2fca2644.png)

---

<div class="post-metadata">

**Author:** ![GothMuscleMommie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GothMuscleMommie](https://forums.unrealengine.com/u/GothMuscleMommie)\
**Post date:** [July 9, 2024, 2:23pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/2 "2024-07-09T14:23:45Z")

</div>

I am noticing this same issue, using 5.4.2 source build. Have you figured this out? Happens for me both with advanced sessions and a custom implementation so I don’t think it is an issue with Advanced Sessions

---

<div class="post-metadata">

**Author:** ![EnricoBC](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enricobc/32/959526_2.png) [@EnricoBC](https://forums.unrealengine.com/u/EnricoBC)\
**Post date:** [July 18, 2024, 3:24am UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/3 "2024-07-18T03:24:21Z")

</div>

This is happening to me as well, using launcher version 5.4.2. Has anyone found a workaround?

From [Unreal 5.4 changelog](https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5.4-release-notes) I noticed this:

- Fixed an issue with the Friends interface in the Steam OSS not properly polling and retaining presence data.

---

<div class="post-metadata">

**Author:** ![EnricoBC](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enricobc/32/959526_2.png) [@EnricoBC](https://forums.unrealengine.com/u/EnricoBC)\
**Post date:** [July 19, 2024, 2:53am UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/4 "2024-07-19T02:53:41Z")

</div>

I inspected the `GetPresence()` method in the engine’s `OnlineFriendsInterfaceSteam.cpp` and made a workaround for this issue (using AdvancedSessions plugin).

In `AdvancedFriendsLibrary.h`, add this to the `UAdvancedFriendsLibrary` class:

```auto
static const FOnlineUserPresence GetPresence(const FUniqueNetId& Id);

```

In `AdvancedFriendsLibrary.cpp`:

```auto
const FOnlineUserPresence EmptyPresence;

const FOnlineUserPresence UAdvancedFriendsLibrary::GetPresence(const FUniqueNetId& Id)
{
  // TODO: insert return statement here
  if (IOnlineSubsystem* SteamOSS = IOnlineSubsystem::Get(STEAM_SUBSYSTEM))
  {
    // Get the steam presence interface
    if (auto OnlinePresence = SteamOSS->GetPresenceInterface().Get())
    {
      TSharedPtr<FOnlineUserPresence> Presence;
      EOnlineCachedResult::Type Result = OnlinePresence->GetCachedPresence(Id, Presence);

      if(Presence.IsValid())
      {
        auto P = *Presence.Get();
        return P;
      }
    }
  }

  return EmptyPresence;
}

```

Then modify the GetStoredFriendsList method’s for loop with this:

```auto
    for (int32 i = 0; i < FriendList.Num(); i++)
    {
      FBPFriendInfo BPF;
      const FOnlineUserPresence pres = GetPresence(FriendList[i]->GetUserId().Get());

      BPF.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
      BPF.DisplayName = FriendList[i]->GetDisplayName();
      BPF.RealName = FriendList[i]->GetRealName();
      BPF.UniqueNetId.SetUniqueNetId(FriendList[i]->GetUserId());
      BPF.bIsPlayingSameGame = pres.bIsPlayingThisGame;

      BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
      BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
      BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
      BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
      // #TODO: Check back in on this in shipping, epic is missing the UTF8_TO_TCHAR call on converting this and its making an invalid string
      //BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
      BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
      BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;

      FriendsList.Add(BPF);
    }

```

Now in blueprints I’m getting the friend list array like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/9/a69f9fcb9d9d3c027bf7022cb6180f6bdd66577b.png)

---

<div class="post-metadata">

**Author:** ![BakonGuy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bakonguy/32/1000091_2.png) [@BakonGuy](https://forums.unrealengine.com/u/BakonGuy)\
**Post date:** [September 27, 2024, 3:13pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/5 "2024-09-27T15:13:07Z")

</div>

This saved me a lot of headache. Thank you for posting this.

---

<div class="post-metadata">

**Author:** ![SquirrelMonkey1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SquirrelMonkey1](https://forums.unrealengine.com/u/SquirrelMonkey1)\
**Post date:** [November 7, 2024, 6:00pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/6 "2024-11-07T18:00:14Z")

</div>

Unfortunately this fix did not work for me, the code still works fine in standalone PIE but when packaged the friends list does not populate at all. No idea why this is happening

---

<div class="post-metadata">

**Author:** ![AxccsAsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AxccsAsh](https://forums.unrealengine.com/u/AxccsAsh)\
**Post date:** [February 14, 2025, 9:18pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/7 "2025-02-14T21:18:33Z")

</div>

so i found the class that causes this issue and a solution that doesnt require a work arround but does require you to use a source build.

the issue are commits made to the OnlineFriendsInterfaceSteam class i personally didnt bother going thought the code to and git to see the exact issue (you can if you want ) but just copy pasted the classes .h and .ccp from 5.3 or 5.2 rebuild the engine and everything seems to work fine again. hope this helps the next person with this issue

appearently you need 5.2 not 5.3 the commits are allready added there

---

<div class="post-metadata">

**Author:** ![prisrok2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@prisrok2](https://forums.unrealengine.com/u/prisrok2)\
**Post date:** [March 11, 2025, 7:59pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/8 "2025-03-11T19:59:22Z")

</div>

Hello, according to your words you just need to take .h .ccp online subsystem steam c 5.3 and throw them for example in 5.5.1 version and everything will work only here is the problem I did so, but the result is the same, if you have succeeded can show or tell how you achieved that the online state will output something

---

<div class="post-metadata">

**Author:** ![AxccsAsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AxccsAsh](https://forums.unrealengine.com/u/AxccsAsh)\
**Post date:** [March 12, 2025, 3:56am UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/10 "2025-03-12T03:56:00Z")

</div>

try 5.2 i think i also needed to go back further and use 5.2 instead let me know if that one works.

---

<div class="post-metadata">

**Author:** ![prisrok2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@prisrok2](https://forums.unrealengine.com/u/prisrok2)\
**Post date:** [March 18, 2025, 8:41pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/11 "2025-03-18T20:41:45Z")

</div>

The point is that it doesn’t work only on the dev version of the build on 480 appid, when you are ready to release the game on your platform it should work fine, or instead you can use external ui and just open the ui with friend invites, but it also doesn’t work on dev builds

---

<div class="post-metadata">

**Author:** ![AxccsAsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AxccsAsh](https://forums.unrealengine.com/u/AxccsAsh)\
**Post date:** [March 27, 2025, 12:52pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/12 "2025-03-27T12:52:24Z")

</div>

then it might have to do with using the 480 spacwar appid i use my own appid and it did work for dev builds to. i did test the updated code in shipping (the non unreal 5.2 or earlier code) in a shipping build with my own appid and as you said once you said it did wotk fine then. its annoying it doesnt work in dev builds but i guess as long as the final version works it should all be fine.

---

<div class="post-metadata">

**Author:** ![Pickleant1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pickleant1](https://forums.unrealengine.com/u/Pickleant1)\
**Post date:** [April 20, 2025, 7:05am UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/13 "2025-04-20T07:05:12Z")

</div>

Thank you so much! I spent a week trying different ways to get the online state from the presence state, and your method in version 5.5 actually works.

---

<div class="post-metadata">

**Author:** ![D4KiR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/d4kir/32/1083891_2.png) [@D4KiR](https://forums.unrealengine.com/u/D4KiR)\
**Post date:** [July 19, 2025, 5:31pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/14 "2025-07-19T17:31:57Z")

</div>

when fix, with blueprint only project

---

<div class="post-metadata">

**Author:** ![Eux86](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eux86](https://forums.unrealengine.com/u/Eux86)\
**Post date:** [July 29, 2025, 12:20am UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/15 "2025-07-29T00:20:14Z")

</div>

you are my savior. Thanks so much.  
With love: a stressed developer.

---

<div class="post-metadata">

**Author:** ![ney\_lc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ney\_lc](https://forums.unrealengine.com/u/ney_lc)\
**Post date:** [February 6, 2026, 9:33pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/16 "2026-02-06T21:33:14Z")

</div>

This fixed my issue // Fill out your copyright notice in the Description page of Project Settings.

#pragma once  
#include “CoreMinimal.h”  
#include “BlueprintDataDefinitions.h”  
#include “Kismet/BlueprintFunctionLibrary.h”  
#include “Online.h”  
#include “Engine/LocalPlayer.h”  
#include “OnlineSubsystem.h”  
#include “Interfaces/OnlineFriendsInterface.h”  
#include “Interfaces/OnlineUserInterface.h”  
#include “Interfaces/OnlineMessageInterface.h”  
#include “Interfaces/OnlinePresenceInterface.h”  
#include “Engine/GameInstance.h”  
#include “Interfaces/OnlineSessionInterface.h”

#include “UObject/UObjectIterator.h”

#include “AdvancedFriendsLibrary.generated.h”

//General Advanced Sessions Log  
DECLARE\_LOG\_CATEGORY\_EXTERN(AdvancedFriendsLog, Log, All);

UCLASS()  
class UAdvancedFriendsLibrary : public UBlueprintFunctionLibrary  
{  
GENERATED\_BODY()  
public:

```auto
// *********Friend List Functions************* //

// Sends an Invite to the current online session to a list of friends
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList", meta = (ExpandEnumAsExecs = "Result"))
static void SendSessionInviteToFriends(APlayerController* PlayerController, const TArray<FBPUniqueNetId>& Friends, EBlueprintResultSwitch& Result);

// Sends an Invite to the current online session to a friend
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList", meta = (ExpandEnumAsExecs = "Result"))
static void SendSessionInviteToFriend(APlayerController* PlayerController, const FBPUniqueNetId& FriendUniqueNetId, EBlueprintResultSwitch& Result);

// Get a friend from the previously read/saved friends list (Must Call GetFriends first for this to return anything)
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList")
static void GetFriend(APlayerController* PlayerController, const FBPUniqueNetId FriendUniqueNetId, FBPFriendInfo& Friend);

// Get the previously read/saved friends list (Must Call GetFriends first for this to return anything)
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList")
static void GetStoredFriendsList(APlayerController* PlayerController, TArray<FBPFriendInfo>& FriendsList);

// Get the previously read/saved recent players list (Must Call GetRecentPlayers first for this to return anything)
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|RecentPlayersList")
static void GetStoredRecentPlayersList(FBPUniqueNetId UniqueNetId, TArray<FBPOnlineRecentPlayer>& PlayersList);

// Check if a UniqueNetId is a friend
UFUNCTION(BlueprintPure, Category = "Online|AdvancedFriends|FriendsList")
static void IsAFriend(APlayerController* PlayerController, const FBPUniqueNetId UniqueNetId, bool& IsFriend);

static FOnlineUserPresence GetPresence(const FUniqueNetId& Id);

```

}; [//c.pp](https://c.pp) // Fill out your copyright notice in the Description page of Project Settings.  
#include “AdvancedFriendsLibrary.h”

// This is taken directly from UE4 - OnlineSubsystemSteamPrivatePCH.h as a fix for the array\_count macro

//General Log  
DEFINE\_LOG\_CATEGORY(AdvancedFriendsLog);

static const FOnlineUserPresence EmptyPresence;

FOnlineUserPresence UAdvancedFriendsLibrary::GetPresence(const FUniqueNetId& Id)  
{  
if (IOnlineSubsystem\* SteamOSS = IOnlineSubsystem::Get(STEAM\_SUBSYSTEM))  
{  
if (IOnlinePresencePtr OnlinePresence = SteamOSS-\>GetPresenceInterface())  
{  
TSharedPtr Presence;  
OnlinePresence-\>GetCachedPresence(Id, Presence);

```auto
		if (Presence.IsValid())
		{
			return *Presence.Get();
		}
	}
}

return EmptyPresence;

```

}

void UAdvancedFriendsLibrary::SendSessionInviteToFriends(APlayerController \*PlayerController, const TArray &Friends, EBlueprintResultSwitch &Result)  
{  
if (!PlayerController)  
{  
UE\_LOG(AdvancedFriendsLog, Warning, TEXT(“SendSessionInviteToFriend Had a bad Player Controller!”));  
Result = EBlueprintResultSwitch::OnFailure;  
return;  
}

```auto
if (Friends.Num() < 1)
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had no friends in invitation array!"));
	Result = EBlueprintResultSwitch::OnFailure;
	return;
}

IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();

if (!SessionInterface.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Failed to get session interface!"));
	Result = EBlueprintResultSwitch::OnFailure;
	return;
}

ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerController->Player);

if (!Player)
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend failed to get LocalPlayer!"));
	Result = EBlueprintResultSwitch::OnFailure;
	return;
}

TArray<TSharedRef<const FUniqueNetId>> List;
for (int i = 0; i < Friends.Num(); i++)
{
	TSharedRef<const FUniqueNetId> val(Friends[i].UniqueNetId.ToSharedRef());
	//TSharedRef<const FUniqueNetId> val(Friends[i].GetUniqueNetId());
	List.Add(val);
}

if (SessionInterface->SendSessionInviteToFriends(Player->GetControllerId(), NAME_GameSession, List))
{
	Result = EBlueprintResultSwitch::OnSuccess;
	return;
}

Result = EBlueprintResultSwitch::OnFailure;
return;

```

}

void UAdvancedFriendsLibrary::SendSessionInviteToFriend(APlayerController \*PlayerController, const FBPUniqueNetId &FriendUniqueNetId, EBlueprintResultSwitch &Result)  
{  
if (!PlayerController)  
{  
UE\_LOG(AdvancedFriendsLog, Warning, TEXT(“SendSessionInviteToFriend Had a bad Player Controller!”));  
Result = EBlueprintResultSwitch::OnFailure;  
return;  
}

```auto
if (!FriendUniqueNetId.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had a bad UniqueNetId!"));
	Result = EBlueprintResultSwitch::OnFailure;
	return;
}

IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();

if (!SessionInterface.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Failed to get session interface!"));
	Result = EBlueprintResultSwitch::OnFailure;
	return;
}

ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerController->Player);

if (!Player)
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend failed to get LocalPlayer!"));
	Result = EBlueprintResultSwitch::OnFailure;
	return;
}

if (SessionInterface->SendSessionInviteToFriend(Player->GetControllerId(), NAME_GameSession, *FriendUniqueNetId.GetUniqueNetId()))
{
	Result = EBlueprintResultSwitch::OnSuccess;
	return;
}

Result = EBlueprintResultSwitch::OnFailure;
return;

```

}

void UAdvancedFriendsLibrary::GetFriend(APlayerController \*PlayerController, const FBPUniqueNetId FriendUniqueNetId, FBPFriendInfo &Friend)  
{

```auto
if (!PlayerController)
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriend Had a bad Player Controller!"));
	return;
}

if (!FriendUniqueNetId.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriend Had a bad UniqueNetId!"));
	return;
}

IOnlineFriendsPtr FriendsInterface = Online::GetFriendsInterface();

if (!FriendsInterface.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriend Failed to get friends interface!"));
	return;
}

ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerController->Player);

if (!Player)
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriend failed to get LocalPlayer!"));
	return;
}

TSharedPtr<FOnlineFriend> fr = FriendsInterface->GetFriend(Player->GetControllerId(), *FriendUniqueNetId.GetUniqueNetId(), EFriendsLists::ToString(EFriendsLists::Default));
if (fr.IsValid())
{
	const FOnlineUserPresence& pres = fr->GetPresence();
	Friend.DisplayName = fr->GetDisplayName();
	Friend.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
	Friend.RealName = fr->GetRealName();
	Friend.UniqueNetId.SetUniqueNetId(fr->GetUserId());
	Friend.bIsPlayingSameGame = pres.bIsPlayingThisGame;

	Friend.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
	Friend.PresenceInfo.bIsJoinable = pres.bIsJoinable;
	Friend.PresenceInfo.bIsOnline = pres.bIsOnline;
	Friend.PresenceInfo.bIsPlaying = pres.bIsPlaying;
	Friend.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
	Friend.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
	// #TODO: Check back in on this in shipping, epic is missing the UTF8_TO_TCHAR call on converting this and its making an invalid string
	//Friend.PresenceInfo.StatusString = pres.Status.StatusStr;
}

```

}

void UAdvancedFriendsLibrary::IsAFriend(APlayerController \*PlayerController, const FBPUniqueNetId UniqueNetId, bool &IsFriend)  
{  
if (!PlayerController)  
{  
UE\_LOG(AdvancedFriendsLog, Warning, TEXT(“IsAFriend Had a bad Player Controller!”));  
return;  
}

```auto
if (!UniqueNetId.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("IsAFriend Had a bad UniqueNetId!"));
	return;
}

IOnlineFriendsPtr FriendsInterface = Online::GetFriendsInterface();

if (!FriendsInterface.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("IsAFriend Failed to get friends interface!"));
	return;
}

ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerController->Player);

if (!Player)
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("IsAFriend Failed to get LocalPlayer!"));
	return;
}

IsFriend = FriendsInterface->IsFriend(Player->GetControllerId(), *UniqueNetId.GetUniqueNetId(), EFriendsLists::ToString(EFriendsLists::Default));

```

}

void UAdvancedFriendsLibrary::GetStoredRecentPlayersList(FBPUniqueNetId UniqueNetId, TArray &PlayersList)  
{  
IOnlineFriendsPtr FriendsInterface = Online::GetFriendsInterface();

```auto
if (!FriendsInterface.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetRecentPlayersList Failed to get friends interface!"));
	return;
}

if (!UniqueNetId.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetRecentPlayersList Failed was given an invalid UniqueNetId!"));
	return;
}

TArray< TSharedRef<FOnlineRecentPlayer> > PlayerList;

// For now getting all namespaces
FriendsInterface->GetRecentPlayers(*(UniqueNetId.GetUniqueNetId()),"", PlayerList);

for (int32 i = 0; i < PlayerList.Num(); i++)
{
	TSharedRef<FOnlineRecentPlayer> Player = PlayerList[i];
	FBPOnlineRecentPlayer BPF;
	BPF.DisplayName = Player->GetDisplayName();
	BPF.RealName = Player->GetRealName();
	BPF.UniqueNetId.SetUniqueNetId(Player->GetUserId());
	PlayersList.Add(BPF);
}

```

}

void UAdvancedFriendsLibrary::GetStoredFriendsList(APlayerController \*PlayerController, TArray &FriendsList)  
{

```auto
if (!PlayerController)
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriendsList Had a bad Player Controller!"));
	return;
}

IOnlineFriendsPtr FriendsInterface = Online::GetFriendsInterface();

if (!FriendsInterface.IsValid())
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriendsList Failed to get friends interface!"));
	return;
}

ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerController->Player);

if (!Player)
{
	UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriendsList Failed to get LocalPlayer!"));
	return;
}

TArray< TSharedRef<FOnlineFriend> > FriendList;
if (FriendsInterface->GetFriendsList(Player->GetControllerId(), EFriendsLists::ToString((EFriendsLists::Default)), FriendList))
{
	for (int32 i = 0; i < FriendList.Num(); i++)
	{
		FBPFriendInfo BPF;

		// ?? THIS IS THE FIX
		const FOnlineUserPresence Pres =
			UAdvancedFriendsLibrary::GetPresence(*FriendList[i]->GetUserId());

		BPF.OnlineState =
			(EBPOnlinePresenceState)((int32)Pres.Status.State);

		BPF.DisplayName = FriendList[i]->GetDisplayName();
		BPF.RealName = FriendList[i]->GetRealName();
		BPF.UniqueNetId.SetUniqueNetId(FriendList[i]->GetUserId());

		BPF.bIsPlayingSameGame = Pres.bIsPlayingThisGame;

		// Presence Info
		BPF.PresenceInfo.bIsOnline = Pres.bIsOnline;
		BPF.PresenceInfo.bHasVoiceSupport = Pres.bHasVoiceSupport;
		BPF.PresenceInfo.bIsPlaying = Pres.bIsPlaying;
		BPF.PresenceInfo.bIsJoinable = Pres.bIsJoinable;
		BPF.PresenceInfo.bIsPlayingThisGame = Pres.bIsPlayingThisGame;
		BPF.PresenceInfo.PresenceState =
			(EBPOnlinePresenceState)((int32)Pres.Status.State);

		FriendsList.Add(BPF);
	}

	return;
}

UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriendsList Failed to get any friends!"));
return;

```

}

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/5/f55a74ca7d1457b32d978220e831a134a11e2b8b.jpeg)

---

<div class="post-metadata">

**Author:** ![cdg\_jimmy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cdg\_jimmy](https://forums.unrealengine.com/u/cdg_jimmy)\
**Post date:** [February 21, 2026, 9:27pm UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/17 "2026-02-21T21:27:58Z")

</div>

This fix from 5.7 works for me - the found session needs to be converted to a SharedPtr, otherwise the reference count is decremented when the function ends and it gets destructed.

[PR #7028: Updated the Steam OSS to have proper presence for users. · EpicGames/UnrealEngine@9a24b9f](https://github.com/EpicGames/UnrealEngine/commit/9a24b9f133f5fc9f43c169317fd3820cb76c52f8)

---

<div class="post-metadata">

**Author:** ![cdg\_jimmy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cdg\_jimmy](https://forums.unrealengine.com/u/cdg_jimmy)\
**Post date:** [February 25, 2026, 8:16am UTC](https://forums.unrealengine.com/t/steam-friend-list-has-not-presence-state-in-build-game/1912324/18 "2026-02-25T08:16:15Z")

</div>

And the fix was committed in 5.7 here  
[https://github.com/EpicGames/UnrealEngine/commit/67b2a3694140000cdc63ccf002d480443c35abc2](https://github.com/EpicGames/UnrealEngine/commit/67b2a3694140000cdc63ccf002d480443c35abc2)
