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

# XblSocialManagerAddLocalUser

> XblSocialManagerAddLocalUser

# XblSocialManagerAddLocalUser

Create a social graph for the specified local user.

## Syntax

```cpp theme={null}
HRESULT XblSocialManagerAddLocalUser(  
         XblUserHandle user,  
         XblSocialManagerExtraDetailLevel extraLevelDetail,  
         XTaskQueueHandle queue  
)  
```

### Parameters

*user*   \_In\_\
Type: XblUserHandle

XBOX Live User to create a graph for.

*extraLevelDetail*   \_In\_\
Type: [XblSocialManagerExtraDetailLevel](/reference/live/xsapi-c/social_manager_c/enums/xblsocialmanagerextradetaillevel)

The level of verbosity that should be in the service calls for this user.

*queue*   \_In\_opt\_\
Type: XTaskQueueHandle

Queue to be used for background operation for this user (Optional). Note: Using XTaskQueueDispatchMode::Immediate for this queue may cause poor performance.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

The result of a local user being added will be triggered through the [XblSocialManagerEventType](/reference/live/xsapi-c/social_manager_c/enums/xblsocialmanagereventtype)::LocalUserAdded event in [XblSocialManagerDoWork](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork). To remove the social graph for the specified local user, call [XblSocialManagerRemoveLocalUser](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerremovelocaluser).

## Requirements

**Header:** social\_manager\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[social\_manager\_c](/reference/live/xsapi-c/social_manager_c/social_manager_c_members)


## Related topics

- [XblSocialManagerGetLocalUserCount](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagergetlocalusercount.md)
- [XblSocialManagerRemoveLocalUser](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerremovelocaluser.md)
- [XblSocialManagerGetLocalUsers](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagergetlocalusers.md)
- [Social Manager overview](/services/xbox-services/community/social-manager/live-social-manager-overview.md)
- [XblSocialManagerExtraDetailLevel](/reference/live/xsapi-c/social_manager_c/enums/xblsocialmanagerextradetaillevel.md)
