# Web Services Connector for Microsoft Graph API - Token Variable Issues

**URL:** <https://developer.sailpoint.com/discuss/t/web-services-connector-for-microsoft-graph-api-token-variable-issues/10657>\
**Category:** IIQ Discussion and Questions\
**Tags:** webservice-connector\
**Created:** [April 28, 2023, 4:07pm UTC](https://developer.sailpoint.com/discuss/t/web-services-connector-for-microsoft-graph-api-token-variable-issues/10657 "2023-04-28T16:07:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ejmatenaer](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@ejmatenaer](https://developer.sailpoint.com/discuss/u/ejmatenaer)\
**Post date:** [April 28, 2023, 4:07pm UTC](https://developer.sailpoint.com/discuss/t/web-services-connector-for-microsoft-graph-api-token-variable-issues/10657/1 "2023-04-28T16:07:36Z")

</div>

I am working on setting up a web services connector to the Microsoft Graph API. I am currently only able to get the test connection to succeed if I manually set the header values to be:  
Authorization Bearer

I’ve attempted using $application.accesstoken$ and $application.access\_token$ and my test connection returns a 401. Does anyone have experience with this type of set up?

---

<div class="post-metadata">

**Author:** ![brian\_weigel](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/brian_weigel/32/2194_2.png) [@brian\_weigel](https://developer.sailpoint.com/discuss/u/brian_weigel)\
**Post date:** [April 28, 2023, 4:30pm UTC](https://developer.sailpoint.com/discuss/t/web-services-connector-for-microsoft-graph-api-token-variable-issues/10657/2 "2023-04-28T16:30:30Z")

</div>

> [@ejmatenaer](#):
>
> I’ve attempted using $application.accesstoken$ and $application.access\_token$ and my test connection returns a 401.

The `$application.accesstoken$` is only created and set as part of using Custom Authentication (see [Configuration for No / Custom Authentication](https://documentation.sailpoint.com/connectors/identityiq/webservices/help/integrating_webservices/iiq_config_for_no_custom_authentication.html#webservice_185329051_1899471)), in which case you would need to also define the `Custom Authentication` connector operation.

If you’re able to successfully access the API with a Bearer token, you should be able to configure the connector’s Authentication settings to use that token for you automatically by using the `API Token` authentication type.

> [@ejmatenaer](#):
>
> I am working on setting up a web services connector to the Microsoft Graph API

I’m curious to what the reason is for configuring a connector to the MS Graph API via the Web Services Connector instead of using the OOB AzureAD connector ([Integrating SailPoint with Azure Active Directory](https://documentation.sailpoint.com/connectors/identityiq/microsoft/azure_ad/help/integrating_azure_active_directory/introduction.html))

---

<div class="post-metadata">

**Author:** ![ejmatenaer](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@ejmatenaer](https://developer.sailpoint.com/discuss/u/ejmatenaer)\
**Post date:** [April 28, 2023, 5:07pm UTC](https://developer.sailpoint.com/discuss/t/web-services-connector-for-microsoft-graph-api-token-variable-issues/10657/3 "2023-04-28T17:07:04Z")

</div>

I’ll check that out, thank you!

I’m attempting this method specifically as a Sailpoint rep mentioned we would need web services connector to manage Azure AD App Roles.

---

<div class="post-metadata">

**Author:** ![tranetechnologies](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/tranetechnologies/32/1062_2.png) [@tranetechnologies](https://developer.sailpoint.com/discuss/u/tranetechnologies)\
**Post date:** [April 29, 2023, 11:09pm UTC](https://developer.sailpoint.com/discuss/t/web-services-connector-for-microsoft-graph-api-token-variable-issues/10657/4 "2023-04-29T23:09:21Z")

</div>

[Azure Web Services Config Example.docx](https://developer.sailpoint.com/discuss/uploads/short-url/msrv5Mtw2ITm9jGB4c6UGlMdgnr.docx) (661.2 KB)  
We use Microsoft API no issues with Web Services I took screenshots of the setup so you can see. One call out is our client ID and secret where encrypted using the API and we reference $application.clientsecret\_CA$

Good luck

---

<div class="post-metadata">

**Author:** ![ejmatenaer](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@ejmatenaer](https://developer.sailpoint.com/discuss/u/ejmatenaer)\
**Post date:** [May 1, 2023, 8:04pm UTC](https://developer.sailpoint.com/discuss/t/web-services-connector-for-microsoft-graph-api-token-variable-issues/10657/5 "2023-05-01T20:04:16Z")

</div>

@tranetechnologies Thank you! Your screenshots helped immensely. After seeing this example, it makes a ton of sense, as this is how I request a token in PowerShell with a client id/secret.

I appreciate all of the help!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:26pm UTC](https://developer.sailpoint.com/discuss/t/web-services-connector-for-microsoft-graph-api-token-variable-issues/10657/6 "2023-07-19T14:26:04Z")

</div>


