Microsoft Entra ID: How-to
Create a custom scope
Normally, access tokens issued by Microsoft Entra ID are issued for Microsoft Graph. However, ModelOp Center requires that the access tokens requested with the following apps be issued for the apps themselves and not Microsoft Graph: gateway-service
, internal-client
, external-integration-client
, and go-cli
.
To have Microsoft Entra ID issue tokens for the aforementioned apps, each app needs a custom scope. For example, custom_scope
as the name of the scope.
To create the custom scope, follow these steps for each app:
Open the app registration
Expand “Manage” menu
Open “Expose an API” tab
Click “Add a scope”
Scope name:
custom_scope
Who can consent? Admins and users
Admin consent display name:
custom_scope
Admin consent description: A custom ModelOp Center scope
User consent display name:
User consent description:
State: Enabled
Once the custom scope is created, it has to be added as a permission on each ModelOp Center app, except for internal-client
, and admin consent must be granted for the app to be able to use it:
Open the app registration
Expand “Manage” menu
Open “API permissions” tab
Click “Add a permission”
Click “APIs my organization uses”
Search for the app by name. For example, “gateway-service”. Select the app
Click “Delegated permissions”
Select
custom_scope
Click “Grant admin consent for _”
Create an app role
To create an app role for a given app, follow these steps:
Open the app registration
Expand “Manage” menu
Click “App roles”
Click “Create app role”
Display name:
modelop_client
Allowed member types: Applications
Value:
modelop_client
Description:
This role is used to distinguish between OAuth2 clients and end users in ModelOp Center
Once the app role is created, it has to be added as a permission on the internal-client
app, and admin consent must be granted for the app to be able to use it:
Open the app registration
Expand “Manage” menu
Open “API permissions” tab
Click “Add a permission”
Click “APIs my organization uses”
Search for the app by name. For example, “internal-client”. Select the app
Click “Application permissions”
Select
modelop_client
Click “Grant admin consent for _”
Set the access token version
To set the version of the access token, follow these steps for each app:
Open the app registration
Expand “Manage” menu
Open “Manifest” tab
Ensure field
"accessTokenAcceptedVersion"
is set to2
. For example:"accessTokenAcceptedVersion": 2
Click “Save”
Grant Group.Read.All permission for Microsoft Graph
In case ModelOp Center needs to display users' group names, permission Group.Read.All must be granted by following these steps:
Open the
internal-client
app registrationExpand “Manage” menu
Open “API permissions” tab
Click “Add a permission”
Click “Microsoft APIs” and select “Microsoft Graph”
Click “Application permissions”
For the “Group” dropdown menu, select “Group.Read.All”
Click “Add permissions”