> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFFriendsServerGetFriendsListAsync

> Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are.

Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends.

## Syntax

```cpp theme={null}
HRESULT PFFriendsServerGetFriendsListAsync(  
    PFEntityHandle titleEntityHandle,  
    const PFFriendsServerGetFriendsListRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`titleEntityHandle`**   PFEntityHandle

PFEntityHandle for a title Entity obtained using PFAuthenticationGetEntityWithSecretKeyAsync.

**`request`**   [PFFriendsServerGetFriendsListRequest\*](/services/playfab/api-references/c/pffriendstypes/structs/pffriendsservergetfriendslistrequest)

Populated request object.

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on Win32, Linux, and macOS. See also ServerAddFriendAsync, ServerGetPlayerProfileAsync, ServerRemoveFriendAsync, ServerSetFriendTagsAsync. When the asynchronous task is complete, call [PFFriendsServerGetFriendsListGetResultSize](/services/playfab/api-references/c/pffriends/functions/pffriendsservergetfriendslistgetresultsize) and [PFFriendsServerGetFriendsListGetResult](/services/playfab/api-references/c/pffriends/functions/pffriendsservergetfriendslistgetresult) to get the result.

## Requirements

**Header:** PFFriends.h

## See also

[PFFriends members](/services/playfab/api-references/c/pffriends/pffriends_members)


## Related topics

- [PFFriendsServerGetFriendsListGetResult](/services/playfab/api-references/c/pffriends/functions/pffriendsservergetfriendslistgetresult.md)
- [Services C API overview - PFFriends.h](/services/playfab/api-references/c/pffriends/pffriends_members.md)
- [PFFriendsServerSetFriendTagsAsync](/services/playfab/api-references/c/pffriends/functions/pffriendsserversetfriendtagsasync.md)
- [PFFriendsServerAddFriendAsync](/services/playfab/api-references/c/pffriends/functions/pffriendsserveraddfriendasync.md)
- [PFFriendsServerGetFriendsListGetResultSize](/services/playfab/api-references/c/pffriends/functions/pffriendsservergetfriendslistgetresultsize.md)
