> ## Documentation Index
> Fetch the complete documentation index at: https://help.lobyco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Access to Lobyco Admin Portal

> Connect your Azure AD to the Lobyco Admin Portal, grant consent once for everyone, and assign the roles that open each section.

Your staff sign in to the Lobyco Admin Portal with their own corporate Azure AD accounts. Lobyco makes that possible with a multi-tenant Azure AD app. You manage who gets which role inside your own directory, and the portal reads the roles from the sign-in token. This page is the setup in your tenant. Your Azure AD administrator does it once per environment.

## Before you start

* Send Lobyco your Azure tenant id. Lobyco whitelists it and sends back the portal address and the name of the portal's Azure AD app, for pre-production and for production. The addresses take the form `https://admin.your-environment.lobyco.net/`; the exact values differ per client and per environment.
* You must be a [Global Administrator, an Application Administrator or a Cloud Application Administrator](https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles) in your tenant. Consent for the whole directory is an admin action.
* Decide which admin users get which roles. The roles, and the portal sections they open, are on [Admin portal roles](/integration/get-started/admin-portal-roles).

## The procedure

<Steps>
  <Step>
    ### Open the portal and sign in

    Open the admin portal address for the environment and sign in with your organisation account.
  </Step>

  <Step>
    ### Accept the requested permissions

    Azure AD asks you to accept the permissions the portal app requests: signing you in and reading your profile. Choose **Accept**.

    <img src="https://mintcdn.com/lobyco-4c9fb3ad/fN3x30V3MgkKoZMx/images/get-started-10-permissions-requested.png?fit=max&auto=format&n=fN3x30V3MgkKoZMx&q=85&s=8df5583f79739c7b08a18d0515d383a5" alt="The Microsoft sign-in dialog titled Permissions requested, listing sign you in and read your profile, with Cancel and Accept buttons" width="1205" height="650" data-path="images/get-started-10-permissions-requested.png" />

    *The consent dialog on the first sign-in to the admin portal*

    The portal then opens empty. There are no sections in the left panel yet, because no role has been assigned. That is the expected state at this point.

    <img src="https://mintcdn.com/lobyco-4c9fb3ad/fN3x30V3MgkKoZMx/images/get-started-11-empty-portal.png?fit=max&auto=format&n=fN3x30V3MgkKoZMx&q=85&s=901f44be5fc8293a82112257d6017135" alt="The Lobyco Admin Portal after sign-in, with an empty left panel" width="3584" height="1568" data-path="images/get-started-11-empty-portal.png" />

    *An empty portal: signed in, no roles yet*
  </Step>

  <Step>
    ### Find the portal app among the enterprise applications

    In the Azure portal, open **Azure Active Directory → Enterprise applications** and search for the app name Lobyco gave you for this environment. The first sign-in created it in your tenant.

    <img src="https://mintcdn.com/lobyco-4c9fb3ad/fN3x30V3MgkKoZMx/images/get-started-12-enterprise-applications.png?fit=max&auto=format&n=fN3x30V3MgkKoZMx&q=85&s=76add903310724c924c8041106968cf3" alt="The Enterprise applications list in the Azure portal, filtered to the Lobyco admin portal app" width="1214" height="590" data-path="images/get-started-12-enterprise-applications.png" />

    *The portal's enterprise application in your tenant*
  </Step>

  <Step>
    ### Grant consent for the whole directory

    Open the app and go to **Permissions**. Choose **Grant admin consent** for your directory. After that, admin users are not asked to consent one by one when they sign in.
  </Step>

  <Step>
    ### Assign users and groups to roles

    Go to **Users and groups** and choose **Add user/group**. Select the Azure AD users or security groups, and assign each a role. A user or a group can hold several roles. The roles are listed on [Admin portal roles](/integration/get-started/admin-portal-roles); `game.admin`, for example, opens the Game section.

    <Tip>
      With Azure AD Premium you can assign a security group to a role, and every member of the group inherits it. The group owner then manages access without being an admin or an app owner.
    </Tip>
  </Step>

  <Step>
    ### Verify access

    Open the admin portal again, in a new tab. The left panel now shows the sections your roles open.

    <img src="https://mintcdn.com/lobyco-4c9fb3ad/fN3x30V3MgkKoZMx/images/get-started-13-portal-sections.png?fit=max&auto=format&n=fN3x30V3MgkKoZMx&q=85&s=822578643b423fb9d7169e20d1786c33" alt="The Lobyco Admin Portal with sections in the left panel: Stores, Membership, Payment Locations, Bonus Campaign, Promotion, Segmentation, App Communication, Game and Data import" width="3584" height="1086" data-path="images/get-started-13-portal-sections.png" />

    *The portal with roles assigned: each section in the left panel comes from a role*
  </Step>
</Steps>

## Failure and edge cases

If the portal does not show what you expect, the cause is usually one of these.

<AccordionGroup>
  <Accordion title="Why is a section missing from the left panel?">
    The admin user lacks the role for it, or signed in before the role was assigned. Assign the role, then sign out and in again; the roles are read from the token at sign-in.
  </Accordion>

  <Accordion title="Why do the roles differ between pre-production and production?">
    The two environments are separate enterprise applications, with separate assignments. Repeat the assignment in each.
  </Accordion>

  <Accordion title="How do I limit a role to some chains or stores?">
    Roles open sections; they do not limit data to a chain or a store. For that, see [Admin portal chain and store level access](/integration/get-started/admin-portal-chain-and-store-level-access).
  </Accordion>
</AccordionGroup>

## Related

* [Admin portal roles](/integration/get-started/admin-portal-roles) — every role and the section it opens.
* [Admin portal chain and store level access](/integration/get-started/admin-portal-chain-and-store-level-access) — limiting an admin user to specific chains or stores.
* [Multi-tenant authentication using client credentials flow](/integration/get-started/api-authentication/multi-tenant-authentication-using-client-credentials-flow) — the matching setup for services instead of people.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.