Open Closed

How to get Tenant's Users Roles using Rest API ? #2364


User avatar
0
PravinRaijade created
  • ABP Framework version: v4.4.3
  • UI type: MVC
  • DB provider: EF Core (separate DB per Tenant)
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi Support,

I am developing mobile app using react native and wants to connect to Tenant DB (separate DB per Tenant) and get given Users Roles details. But, I don't see API accepting Tenant Identification. This is little urgent. Please help.


4 Answer(s)
  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    Usually, you can use ICurrentTenant to get current tenant info, if your API needs to control it, you can pass tenantId to your API.

    https://docs.abp.io/en/abp/latest/Multi-Tenancy#icurrenttenant https://docs.abp.io/en/abp/latest/Multi-Tenancy#change-the-current-tenant

  • User Avatar
    0
    PravinRaijade created

    hi

    Usually, you can use ICurrentTenant to get current tenant info, if your API needs to control it, you can pass tenantId to your API.

    https://docs.abp.io/en/abp/latest/Multi-Tenancy#icurrenttenant https://docs.abp.io/en/abp/latest/Multi-Tenancy#change-the-current-tenant

    Hi Support,

    But none of the following API accept TenantID/ Tenant Name

    GET /api/identity/users/{id}

    PUT /api/identity/users/{id}

    POST /api/identity/users/{id}

    I want to authenticate the mobile User using "User Name & Password" and based on the Role of the logged in User, decide on the mobile application workflow.

    how can I change the Tenant using Mobile App? is there any API available out-of-the-box?

  • User Avatar
    0
    PravinRaijade created

    But none of the following API accept TenantID/ Tenant Name

    GET /api/identity/users/{id}

    PUT /api/identity/users/{id}

    POST /api/identity/users/{id}

    I want to authenticate the mobile User using "User Name & Password" and based on the Role of the logged in User, decide on the mobile application workflow.

    how can I change the Tenant using Mobile App? is there any API available out-of-the-box?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Please check the document, https://docs.abp.io/en/abp/latest/Multi-Tenancy#determining-the-current-tenant

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11