Skip to content

Technical Users

Introduction

Settings allows you to create and manage Technical Users for your Insights Hub environment. They can be used for accessing Insights Hub APIs, similar to App Credentials. You can create a maximum of 10 Technical Users within the Settings application.

Prerequisite

Only the users with TenantAdmin role can create and manage Technical Users.

User interface

Access the "Technical Users" Tab from the left navigation. The following graphic shows the "Technical Users" section. Technical User Details

① Create a new technical user
② Shows the assigned roles of the technical user
③ Edit the description of the technical user
④ Delete the technical user
⑤ Edit the assigned roles of the technical user


Once you have created a Technical User, the following screen with the Technical user details is shown. The password will disappear, if you refresh the page or select another technical user or move out of the current screen.

Technical User Created

Create a new Technical User

To create a new Technical User, proceed as follows:

  1. Open the "Technical User" tab and click "Create technical user".
  2. Enter a user name, e.g. "robin".

Note

  • The username uses the tenant name as a prefix.
  1. Enter a description for the Technical User.
  2. Click "Create technical user".
    • The Login information appears.
  3. To copy the username and the password into clipboard, click copy clipboard.

Note

  • The password will disappear, if you refresh the page or select another technical user or move out of the current screen.

Result

  • You have created a Technical User. It can now be used to access Insights Hub APIs.

Edit role assignment for Technical User

It is now possible to edit the role assignment of the Technical User. To edit the role assignment for the Technical User, proceed as follows:

  1. Open the "Technical User" tab and select the Technical User you want to edit.
  2. Click "Edit Roles" in the "Roles" tab.
  3. Select the roles you want to add or deselect the role you want to remove and click "Next".
  4. Click "Save".

Delete Technical User

Once you reach the maximum number of Technical Users, you can delete the Technical Users which are no longer required. To delete the Technical User, proceed as follows:

  1. Open the "Technical User" tab and select the Technical User you want to delete.
  2. Click "Delete".
  3. To delete the Technical User, click "Delete" in the confirm dialog.

Result

  • You have deleted the selected Technical User and the remaining Technical User number increases.

Obtain a token for Technical User

To directly work with Insights Hub API’s you need to obtain a token using the credentials of the Technical User that you have just created.

To get a token, you have to execute a POST request using the following URL https://{tenantName}.piam.eu1.mindsphere.io/oauth/token?grant_type=client_credentials. 1. Provide the client id and client secret of your Technical User as basic authentication (RFC7617)

Sample request:

POST https://{tenantName}.piam.eu1.mindsphere.io/oauth/token?grant_type=client_credentials HTTP/1.1
Authorization: Basic {base64 encoded client_id:client_secret}

Sample request using python:

ServiceUrl = f"https://{{ tenant }}.piam.eu1.mindsphere.io/oauth/token?grant_type=client_credentials"
MessageBytes = str({{ clientId }}+":"+{{ secret }}).encode('ascii')
Base64Credentials = base64.b64encode(MessageBytes)
ResponseTechToken = requests.request('POST', ServiceUrl, headers={'Authorization': 'Basic ' + str(Base64Credentials.decode("utf-8")),'accept':'application/json'})

Sample response:

{
    "access_token": "eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vZWFvcHLyLnBpYW0...nWfO88P29u1Ozw",
    "token_type": "bearer",
    "expires_in": 1799,
    "scope": "mdsp:core:assetmanagement.admin",
    "jti": "da6c28e603axxxxxa6b0c40a2072c9c5"
}


Last update: January 22, 2024