> ## 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.

# PFLobbyGetOwnerMigrationPolicy

> PFLobbyGetOwnerMigrationPolicy reference for reading the configured owner migration policy on a PlayFab lobby via the PlayFab Multiplayer C++ SDK.

Gets the owner migration policy of the lobby.

## Syntax

```cpp theme={null}
HRESULT PFLobbyGetOwnerMigrationPolicy(  
    PFLobbyHandle lobby,  
    PFLobbyOwnerMigrationPolicy* ownerMigrationPolicy  
)  
```

### Parameters

**`lobby`**   PFLobbyHandle

The handle of the lobby.

**`ownerMigrationPolicy`**   [PFLobbyOwnerMigrationPolicy\*](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/enums/pflobbyownermigrationpolicy)\
*output*

The output owner migration policy.

### Return value

Type: HRESULT

`S_OK` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PFMultiplayerGetErrorMessage()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage).

## Remarks

The owner migration policy cannot change for the lifetime of the lobby. <br /><br /> If this lobby object was created by calling [PFMultiplayerJoinLobby()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerjoinlobby), this method will return an error until [PFMultiplayerStartProcessingLobbyStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges) provides a [PFLobbyUpdatedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange) with [PFLobbyUpdatedStateChange::ownerMigrationPolicy](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange) set to true. If joining the lobby succeeds, this field is guaranteed to be populated by the time PFMultiplayerStartProcessingLobbyStateChanges() provides a [PFLobbyJoinLobbyCompletedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyjoinlobbycompletedstatechange).

## Requirements

**Header:** PFLobby.h

## See also

[PFLobby members](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)


## Related topics

- [PFMultiplayer C/C++ API overview - PFLobby.h](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
- [Lobby.OwnerMigrationPolicy](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/Lobby/OwnerMigrationPolicy.md)
- [PFLobbyOwnerMigrationPolicy](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/enums/pflobbyownermigrationpolicy.md)
- [LobbyOwnerMigrationPolicy](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyOwnerMigrationPolicy.md)
- [LobbyCreateConfiguration.OwnerMigrationPolicy](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyCreateConfiguration/OwnerMigrationPolicy.md)
