- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 12:51 AM
We are integrating our ServiceNow instance with Intune application,
https://www.servicenow.com/community/cmdb-forum/intune-integration-with-servicenow/m-p/2555215
by following the above URL done the required part mentioned, can you please guide us what we have to do next to proceed further.
Thanks,
Asish
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 03:16 AM - edited 04-01-2024 03:18 AM
Hi @Asish17
Once the App Registrations configuration has been done in Azure. You can come back to ServiceNow, define a new Application Registries type OAuth Provider. Then, update required fields to match your Azure tenant and ServiceNow instance.
1. Client ID: <Application (client) ID>
2. Client Secret: <client_secret>
3. Authorization URL: https://login.microsoftonline.com/<Directory (tenant) ID>/oauth2/v2.0/authorize
4. Token URL: https://login.microsoftonline.com/<Directory (tenant) ID>/oauth2/v2.0/token
5. Token Revocation URL: https://login.microsoftonline.com/<Directory (tenant) ID>/oauth2/v2.0/token
6. Redirect URL: https://<instance_name>.service-now.com/oauth_redirect.do
Now, ensure that the Entity Scopes and Entity Profiles are properly set up.
Finally, we create a new Credential and link to the Profile created above.
To test the connection, utilize the related links to Get OAuth Token. A message will confirm successful authentication.
Finally, we can now use Access Token from the Credential to authenticate API requests or you can also utilize the Credential inside Flow Designer through Connection & Credential Aliases.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2024 08:33 PM
Hi @Asish17
You can utilize the Microsoft Graph APIs to retrieve data from Intune. Sample below:
List managedDevices
GET https://graph.microsoft.com/v1.0/deviceManagement/managedDevices
Just make sure you pass the Access Token to the Request Header. (or you can configure the Connection & Credential Aliases within the Flow as mentioned above)
Header Value
Authorization | Bearer {token}. Required. |
Accept | application/json |
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 01:03 AM
Sample for the scripting part by the way.
var token = '<access_token>';
var reqEndpoint = 'https://graph.microsoft.com/v1.0/deviceManagement/managedDevices';
var sm = new sn_ws.RESTMessageV2();
sm.setEndpoint(reqEndpoint);
sm.setHttpMethod('get');
sm.setRequestHeader('Authorization', 'Bearer ' + token);
sm.setRequestHeader('Accept', 'application/json');
var response = sm.execute();
var body = sm.getBody();
var code = sm.getStatusCode();
gs.info(body);
gs.info(code);
Regards to Flow Designer, you can have a look into Configure a connection in the Connections dashboard. (It requires Integration Hub activated)