> For the complete documentation index, see [llms.txt](https://brixxbox.gitbook.io/brixxbox-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brixxbox.gitbook.io/brixxbox-documentation/client-api-reference/functions/getuserclaim.md).

# getUserClaim

Brixxapi allows user to set a claim value. This claim Value gets added when user gets logged in. It is used to identify users claim. For example, to check whether a user is someone who he claims to be or not. By using this function, we can get userClaim and make useful comparisons in our apps.

### Parameters

1. claimName - This is the only paramter this function takes. It is the claiName which should be in the form of string.. Brixxapi allows user to add claim name with or with out "claim\_" prefix.

#### Example

```
Let suppose we have a claimName parameter "EFitDealer" then Brixxapi will consider both "EFitDealer" and "claim_EFitDealer" as same.
```

### Example Usages

We can use "getUserClaim" function to get user's claim, a way to check user identity. As a parameter, we need to provide the claimName to this function. We can provide only the claimName or the claimName plus "claim\_" as prefix. Lets see both of them in action. We have a claimName "EfitDealerNumber", now we want to get userClaim:

Lets first do it without prefix "claim\_".

```javascript
   let dealerNumber = brixxApi.getUserClaim("EfitDealerNumber");
   console.log("The dealer Number is: " + dealerNumber);
```

It is ame as the previous example but now we use prefix.

```javascript
   let dealerNumber = brixxApi.getUserClaim("claim_EfitDealerNumber");
   console.log("The dealer Number is: " + dealerNumber);
```

An important thing to notice here is that it is required by Brixxbox that for using SQL Parameters for claims must have to start with the "claim\_" prefix.

For example, Userclaims can also be used as SQL parameters:

```sql
   select @claim_EfitDealerNumber
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://brixxbox.gitbook.io/brixxbox-documentation/client-api-reference/functions/getuserclaim.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
