Under the hood of Workspace One is a powerful notification system used to notify users of new applications, updated configurations or just simply, for what ever the administrator requires. From time to time organisations will have the requirement to send out customised notifications to their users, so here is a guide on how to do it.

In order to configure and test this, we will be using the application Postman that can be downloaded here. This application will allow us to hook into Workspace One’s API’s and send out our customised messages.

Creating a Service Client

First thing will be to create a service client within the Identity manager console.

  1. Login to your vIDM console
  2. In the top right click on the drop down and select ‘Administration Console’
  3. Click catalogue
  4. Click settings
  5. Select ‘Remote Access’ in the left hand column
  6. Click ‘Create Client’
  7. Change access type to ‘Service Client Token’

Make a note of the ‘Shared Secret’ you’ll need it shortly.

Getting an Access Token

You will need to acquire a new access token whenever the current token expires. By default, an access token is valid for 6 hours. To acquire an access token, follow the below steps:

  • Create a new request in Post man:
  • Save your new request somewhere logical
  • Make sure the request is set to post
  • Click on the Authorization tab and change the type to ‘Basic Auth’
  • For the User, input the user name you added for your Service Client (Above) and add the ‘Shared Secret’ in the password field.
  • Now, switch to the ‘Headers’ tab and add the key ‘Content-Type’ with a value of ‘application/x-www-form-urlencoded’
  • Switch to the ‘Body’ tab and insert the following as ‘raw’: grant_type=client_credentials
  • We can now send the request to vIDM. This should return our new ‘Access Token’. What we’ve essentially done, is authenticate against a particular API and request an access token. Nailed it!
  • You’ll notice that the token type is ‘Bearer’. This is important as this is how we’ll authenticate next.

Create a New Notification

User Notification

For this notification we’re going to obtain the User ID through the use of APIs and send them a notification.

  • Create a new request in Postman
  • Make sure the request type is ‘Get’
  • You need to query the following API: https://eucse.vmwareidentity.eu/SAAS/jersey/manager/api/scim/Users?
  • In the ‘Params’ tab add ‘filter’ as a key with a value of ‘userName eq “chodge”
  • Now click the Authorization tab. This will need to be the Bearer Access token that we obtain above.
  • Select the ‘Headers’ tab. We need add ‘Accept’ as a key with ‘Application/json’ as the value:
  • Hit send and you should receive all the information about the user you’ve queried.
  • Copy the user ID. We’ll use this to send the notification.

Sending a Notification

Now that we’ve obtained the Access token and the user ID, we’re ready to send a notification to a specific user.

  • Create a new request in Postman
  • Make sure this request is set to POST
  • Set the API to: https://eucse.vmwareidentity.eu/ws1notifications/api/v1/users/{targetUserId} /notifications
  • We obtained the User ID in the previous step so customise it as you see fit.
  • Under the Authorization tab, make sure that this contains the Bearer Token obtained in the first step

  • Now switch to the ‘Headers’ tab and add ‘Content-Type’ as a key with ‘application/json’ as the value
  • Now under body tab is where you can have the most fun.
  • Below is the notification I’m going to send.

{
“header”:{
“title”:”Welcome to the EUCSE lab!”
},
“body”:{
“description”:”A place for you to demo our integrations and blog about it! Enjoy!”
},
“actions”:[{
“id”:”a8406d97-2f46-45a8-9e3d-f68dac0cdf18″,
“label”:”To the Blog!”,

“completed_label”: “Wow! What a Blog!”, “type”:”POST”,
“primary”: true,
“allow_repeated”: false,
“url”:{
“href”:”https://eucse.vmwareidentity.eu:443/SAAS/API/1.0/GET/apps/launch/app/72143cc9-d60d-42a3-b52e-ffaac7927b6d”
},
“action_key”:”OPEN_IN”
}]

}

For more information on the notifications and how to customise them check out the following document

Loader Loading…
EAD Logo Taking too long?
Reload Reload document
| Open Open in new tab

Download [413.64 KB]

https://code.vmware.com/apis/402#/Notifications

Nailed it!
Spread the love