Skip to main content
By default a role opens a section of the Lobyco Admin Portal for every chain and store. For chain and store managers you can narrow that. The Promotion Platform and Loyalty Membership products then show only the data of the chains or stores on the admin user’s account. The ids travel as custom claims in the sign-in token, through Azure AD extension properties. This page is the setup in your tenant and in Postman. Your Azure AD administrator does it. There are three levels of access:

Before you start

  • The portal’s enterprise application must exist in your tenant, and roles must work. See Access to Lobyco Admin Portal.
  • The chain and store ids must be the ones imported into Lobyco’s store master data. A claim with an id Lobyco does not know matches nothing. See Importing store and chain data.
  • You must be able to register apps and grant admin consent in your tenant. The last steps run in Postman.

The procedure

The setup has three parts. An extension app owns the custom attributes, the portal’s enterprise application maps them to claims, and each Azure AD user carries the values.
1

Register the extension app

In Microsoft Entra ID, open App registrations and choose New registration.The App registrations page in Microsoft Entra ID, with arrows pointing at the App registrations menu item and the New registration buttonApp registrations, and the New registration buttonFill in:
  • Name: lobycoportal-extensions, with the environment name appended, so the app is easy to find later.
  • Supported account types: Accounts in this organizational directory only.
Choose Register.
2

Add a client secret

Under Certificates & secrets, choose New client secret. The description and the expiry are your choice.The Add a client secret panel of the extension app, with a description field and an Expires dropdownAdding a client secret to the extension appCopy the secret value right after it is created and store it securely. The Postman collection uses it later, and the portal shows it only once.The client secrets list, with an arrow pointing at the copy button next to the secret valueCopy the value from the list before you leave the page
3

Grant the permission to write user profiles

Under API permissions, choose Add a permission, then Microsoft Graph, then Application permissions. Search for User.ReadWrite.All, tick it and choose Add permissions. The extension app writes the chain and store ids to user profiles with this permission.The Request API permissions panel for Microsoft Graph, Application permissions selected, with User.ReadWrite.All tickedUser.ReadWrite.All as an application permissionThen choose Grant admin consent for your directory and confirm.The API permissions page with the Grant admin consent confirmation dialog open, and User.ReadWrite.All still listed as not grantedConsent must be granted before the permission takes effect
4

Edit the manifest

Open Manifest. Set acceptMappedClaims to true and accessTokenAcceptedVersion to 2, and save.The manifest editor of the extension app, with acceptMappedClaims true and accessTokenAcceptedVersion 2 marked with arrowsThe two manifest properties to change
5

Create the extension properties

Add two extension properties to the extension app, chain_ids and store_ids. This is a Microsoft Graph call, and it takes a token with rights on the application object. The quickest way to get one is from the Azure portal’s own session. Open Users in Microsoft Entra ID with the browser’s developer tools on the Network tab, and choose Refresh. Copy the bearer token from the Authorization header of the $batch request.The Users page with the browser developer tools open on the Network tab, the $batch request selected and its Authorization header shownThe portal’s own Graph token, taken from the $batch requestThen send one request per property:
Repeat it with "name": "chain_ids". The object id is on the extension app’s Overview page; it is not the application (client) id.
6

Map the claims on the portal’s enterprise application

Open Enterprise applications and find the portal’s service principal: the app Lobyco named for this environment. Go to Single sign-on.The OIDC-based sign-on page of the portal's enterprise application, with store_ids and chain_ids listed under Attributes & ClaimsSingle sign-on on the portal’s enterprise application, with both claims already mappedUnder Attributes & Claims, choose Edit, then Add new claim.The Attributes & Claims page, with an arrow pointing at the Add new claim buttonAdd new claimName the claim store_ids, set Source to Attribute, and under Schema extension attribute pick the extension app and its store_ids property. Save, and repeat for chain_ids.The Manage claim form, with the name store_ids and the source Attribute, and the Select Application panel showing the extension app selectedEach claim points at an extension property of the extension appCheck that both chain_ids and store_ids are listed and saved.
7

Find the user’s object id

Open Microsoft Entra ID → All users, search for the admin user by email and open the profile. Copy Object ID. The Postman requests address the user by it.A user's overview page in Microsoft Entra ID, with an arrow pointing at the copy button next to Object IDThe Object ID on the user’s profile
8

Import the Postman collection

Copy the JSON from Postman collection into a .json file and import it in Postman. On the collection’s Variables tab, fill in the values and choose Save:
9

Assign the ids to the user

Run the collection’s requests in order.
  1. Step 1. Get extension app token fetches a token with the extension app’s credentials and stores it in the collection. The next two requests use it.
  2. Step 2. Get user attributes reads the user and the two extension properties, so you see the current values.
  3. Step 3. Assign custom claim to the user sends a PATCH with the ids. Edit the body before you send it.
Postman, the Assign custom claim request: a PATCH to graph.microsoft.com with a body that sets the store_ids extension property to one id, answered with 204 No ContentAssigning one store id; Microsoft Graph answers 204 No ContentOne chain:
Several stores:
10

Check the claims on the user

Run Step 2. Get user attributes again. The response now lists the ids you assigned.Postman, the Get user attributes request, with a 200 OK response that lists the store_ids extension property with one idThe user’s attributes after the assignmentThen ask the admin user to sign out of the portal and in again. They now see only the chains or stores on their account.

Failure and edge cases

If the admin user sees something else, the cause is usually one of these.
The claims are read at sign-in. A user who was signed in during the assignment keeps the old token until they sign out and in again.
The PATCH sets the whole list; it does not add to it. To add store 14 to a user who has 12 and 13, send all three. To remove a store, send the list without it.
The ids must be exactly the ones imported into Lobyco’s store master data. The portal does not translate names or codes.
Decode it and check that store_ids or chain_ids is present with the right values. See Verifying the claims in the auth token.
Last modified on October 19, 2026