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

# PFAccountManagementClientLinkOpenIdConnectAsync

> Links an OpenID Connect account to a user's PlayFab account, based on an existing relationship between a title and an Open ID Connect provider and the OpenId.

Links an OpenID Connect account to a user's PlayFab account, based on an existing relationship between a title and an Open ID Connect provider and the OpenId Connect JWT from that provider.

## Syntax

```cpp theme={null}
HRESULT PFAccountManagementClientLinkOpenIdConnectAsync(  
    PFEntityHandle entityHandle,  
    const PFAccountManagementLinkOpenIdConnectRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFAccountManagementLinkOpenIdConnectRequest\*](/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementlinkopenidconnectrequest)

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 all platforms. See also ClientLoginWithOpenIdConnectAsync, ClientUnlinkOpenIdConnectAsync. Call XAsyncGetStatus to get the status of the operation. If the service call is unsuccessful, the async result will be E\_PF\_INVALID\_IDENTITY\_PROVIDER\_ID, E\_PF\_LINKED\_IDENTIFIER\_ALREADY\_CLAIMED or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling.

## Requirements

**Header:** PFAccountManagement.h

## See also

[PFAccountManagement members](/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members)


## Related topics

- [Services C API overview - PFAccountManagement.h](/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members.md)
- [PFAccountManagementClientUnlinkOpenIdConnectAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientunlinkopenidconnectasync.md)
- [PFAccountManagementLinkOpenIdConnectRequest](/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementlinkopenidconnectrequest.md)
- [PFAccountManagementUnlinkOpenIdConnectRequest](/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementunlinkopenidconnectrequest.md)
- [PFAccountManagementClientLinkGameCenterAccountAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientlinkgamecenteraccountasync.md)
