
Error 13004 with "Office.Auth" Interface in React.js Outlook Add-in - "Invalid application resource URL provided."
We are developing a React.js-based Outlook add-in and tried to authenticate using the Office.Auth
interface with an app registered in the Azure portal. Our configuration follows the official Microsoft documentation:
Manifest Configuration:
```<WebApplicationInfo>
<Id>{APP_ID}</Id>
<Resource>api://localhost:3000/{APP_ID}</Resource>
<Scopes>
<Scope>Files.Read.All</Scope>
<Scope>offline_access</Scope>
<Scope>openid</Scope>
<Scope>profile</Scope>
</Scopes>
</WebApplicationInfo>```
For local development, we set the Resource
to api://localhost:3000/{APP_ID}
based on the documentation guidelines.
Office.Auth Code:
```try {
const accessToken = await Office.auth.getAccessToken({
allowSignInPrompt: true,
allowConsentPrompt: true,
forMSGraphAccess: true,
});
console.log("accessToken", accessToken);
} catch (error) {
console.log("Error obtaining token", error);
}```
We are using the add-in in local development mode (localhost
).
The error occurs right after calling Office.Auth.getAccessToken
.
We have tried Authenticating Office.Auth interface in Outlook Web application.
Cleared cache and reinstalled the manifest after each change.
Verified that the app is correctly registered in the Azure portal.
Confirmed the redirect URI is set to **https://localhost:3000
**in Azure.
Error 13004:
```{
"name": "Invalid application resource URL provided.",
"message": "Invalid resource URL specified in the manifest.",
"code": 13004
}```
Based on the documentation, we anticipated that by properly configuring the "WebApplicationInfo" section in the manifest, setting the Resource to api://localhost:3000/ {APP_ID} for local development, and registering the app in the Azure portal, the authentication flow would work smoothly, without any errors related to the resource URL.
Office.Auth.getAccessToken() function should return an access token, allowing my React.js-based Outlook add-in to authenticate successfully, but it is throwing error 13004, Any suggestions to this problem would be greatly appreciated!We are developing a React.js-based Outlook add-in and tried to authenticate using the Office.Auth
interface with an app registered in the Azure portal. Our configuration follows the official Microsoft documentation:
Manifest Configuration:
```<WebApplicationInfo>
<Id>{APP_ID}</Id>
<Resource>api://localhost:3000/{APP_ID}</Resource>
<Scopes>
<Scope>Files.Read.All</Scope>
<Scope>offline_access</Scope>
<Scope>openid</Scope>
<Scope>profile</Scope>
</Scopes>
</WebApplicationInfo>```
For local development, we set the Resource
to api://localhost:3000/{APP_ID}
based on the documentation guidelines.
Office.Auth Code:
```try {
const accessToken = await Office.auth.getAccessToken({
allowSignInPrompt: true,
allowConsentPrompt: true,
forMSGraphAccess: true,
});
console.log("accessToken", accessToken);
} catch (error) {
console.log("Error obtaining token", error);
}```
- We are using the add-in in local development mode (
localhost
). - The error occurs right after calling
Office.Auth.getAccessToken
. - We have tried Authenticating Office.Auth interface in Outlook Web application.
- Cleared cache and reinstalled the manifest after each change.
- Verified that the app is correctly registered in the Azure portal.
- Confirmed the redirect URI is set to **
https://localhost:3000
**in Azure. Error 13004:```{ "name": "Invalid application resource URL provided.", "message": "Invalid resource URL specified in the manifest.", "code": 13004
}```
Based on the documentation, we anticipated that by properly configuring the "WebApplicationInfo" section in the manifest, setting the Resource to api://localhost:3000/ {APP_ID} for local development, and registering the app in the Azure portal, the authentication flow would work smoothly, without any errors related to the resource URL.
Office.Auth.getAccessToken() function should return an access token, allowing my React.js-based Outlook add-in to authenticate successfully, but it is throwing error 13004, Any suggestions to this problem would be greatly appreciated!
Microsoft 365 and Office | Development | Other
