> For the complete documentation index, see [llms.txt](https://docs.industryapps.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.industryapps.net/authentication/user-and-role-identification.md).

# User and Role Identification

The current user is one of the distinguishing parameters that every application must be aware of.  In IndustryApps, the current user is only an identifier, let's say `userId` . The `userId` is associated with a company identified by `companyId` . both these attributes combine to provide uniqueness to a request.&#x20;

Every user has roles that are associated with your application. Suppose you are bringing an application for warehouse handling, let's say Purchase Order Calendar, and your application has the following rights `VIEW_PO_CALENDAR` , `ADD_PO_CALENDAR` and `UPDDATE_PO_CALENDAR` . To identify a User you only need the `userID` , `companyId` , and a list of rights.&#x20;

While registering your application with the IndustryApps platform you can add all the rights corresponding to your application. We assign these rights to some users and allow them to visit your application with limited rights.&#x20;

Now let's describe this with the example of the Purchase Order Calendar. The application should be implemented in such a way that if the current user has \[*VIEW\_PO\_CALENDAR*] then you can allow him to VIEW the Purchase order calendar and not allowing to EDIT it and if rights contain \[ *VIEW\_PO\_CALENDAR*, *ADD\_PO\_CALENDAR*] then you should allow him to VIEW and ADD to Purchase order calendar.&#x20;

We follow the practice of making the application stateless. We pass to identify the details of the user associated with each request. You can get the current user responsible for the request from the platform API.

### Application Localization

Localization is one of the important features that every application must be aware of. Every application must react to the localization changes to the platform. Whenever a user switches the language the application will get a refresh request. You can get the currently selected language at the client side from the `platform-api.js`&#x20;


---

# 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://docs.industryapps.net/authentication/user-and-role-identification.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.
