PFAuthenticationGetEntityRequest request{}; XAsyncBlock async{}; // Add your own error handling when FAILED(hr) == true HRESULT hr = PFAuthenticationGetEntityWithSecretKeyAsync( serviceConfigHandle, secretKey, // title specific secret key &request, &async ); hr = XAsyncGetStatus(&async, true); // This is doing a blocking wait for completion, but you can use the XAsyncBlock to set a callback instead for async style usage PFEntityHandle entityHandle; hr = PFAuthenticationGetEntityWithSecretKeyGetResult( &async, &entityHandle );