Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
There are two ways to authenticate and gain access to the Microsoft Web IQ APIs. Use an API key for the quickest start and Microsoft Entra ID for production workloads.
API key
Create an API key in the Microsoft Web IQ portal to authenticate with Microsoft Web IQ APIs. Pass it in the x-apikey header on every request:
x-apikey: <YOUR_API_KEY>
Warning
API keys grant full access to your account. Store them in a secret manager, not in client-side code or source control.
Microsoft Entra ID
Use Microsoft Entra ID OAuth 2.0 Client Credentials (app-only token) for authenticating with the Microsoft Web IQ API.
Note
Microsoft Entra ID is the identity platform. An app registration has an Application (client) ID, which identifies the application in your tenant and is the value you bind to your Web IQ AppID. At runtime, your app exchanges its credentials for a Microsoft Entra access token to send with each API request.
Prerequisites
Set up a tenant: To register your app, an Azure tenant is required. An Azure subscription isn't required, but if your organization already has one or more Azure subscriptions or a Microsoft 365 organization, then you already have an Azure tenant. Otherwise, provision a new tenant.
Create an app registration: An app registration establishes a trust relationship between your application and the Microsoft identity platform, enabling your app to authenticate and access resources securely.
When you register your app, a client ID, object ID, and directory ID are created. To create credentials for your app registration, see Register an application with the Microsoft identity platform.
Entra ID setup steps
App registration - Use an existing Microsoft Entra ID app registration or create one. Record its Application (client) ID. In the Azure portal, find it under Microsoft Entra ID > App registrations > your app > Overview.
Bind your app registration - Go to Profile Management, select the Application (Client) IDs tab, and then select Bind Application (Client) ID. Enter your Entra application (client) ID. Profile updates can take up to one minute to synchronize.
Note
If the Application (Client) IDs tab isn't available, Microsoft Entra ID authentication might not be enabled for your trial. Contact your Microsoft representative to request dedicated access.
Acquire a token - Use the client credentials grant with your preferred Microsoft Authentication Library (MSAL):
- Authority:
https://login.microsoftonline.com/{your-tenant-id} - Scope:
https://api.microsoft.ai/.default
- Authority:
Then pass the access token on every Web IQ request:
Authorization: Bearer <access-token>
Calling more than one AppID
One Entra application (client) ID can be bound to more than one Web IQ AppID, for example one AppID per Web IQ resource or per workload. When it is, add the APPID query parameter to every request to choose which AppID the call uses. Rate limits count against that AppID.
POST https://api.microsoft.ai/v3/search/web?APPID=<your-web-iq-appid>
Authorization: Bearer <access-token>
Content-Type: application/json
APPID takes your Web IQ AppID, not your Entra application (client) ID. Your Microsoft contact provides your Web IQ AppIDs.
| Your Entra application (client) ID is bound to | APPID on the request |
Result |
|---|---|---|
| One AppID | Missing, or that AppID | Request succeeds |
| One AppID | A different AppID | HTTP 403 AuthUnauthorizedAppId |
| Several AppIDs | Missing or empty | HTTP 400 AuthAppIdSelectionRequired |
| Several AppIDs | One of your bound AppIDs | Request succeeds |
| Several AppIDs | Any other AppID | HTTP 403 AuthUnauthorizedAppId |
| No AppID | Any | HTTP 401 AuthUnauthorizedEntryId |
Warning
API keys don't take APPID. Each API key belongs to one AppID. A key-authenticated request that includes the APPID parameter, even empty, returns HTTP 401 AuthUnauthorizedEntryId.
Request headers
| Header | Value | Description |
|---|---|---|
x-apikey or Authorization |
<your-api-key> or Bearer <access-token> |
Your API key or Microsoft Entra ID access token for authentication |
Content-Type |
application/json |
Request body format |
Next steps
- Make your first call in the quickstart.
- Explore the REST API reference.
Support and feedback
Send technical issues or feedback to Web IQ Support.