I'm getting an failure when trying to save my document/roaming settings.
The message in PowerPoint and Word is the following(saving to document.settings): {"name":"Internal Error","message":"An internal error has occurred.","code":5001}
The message in Outlook (saving to roamingSettings): {"name":"GenericSettingsError","message":"Permission denied","code":9019}
My code:
Office.context.document.settings.set('token', token);
Office.context.document.settings.set('email', email);
Office.context.document.settings.saveAsync(function (asyncResult) {
if (asyncResult.error) {
displayError(asyncResult.error.message);
}
});
In Outlook code looks the same - just settings are different.
The problem revealed more a less the same time when office.js update 16.0.11902.35450 was released. and does not exist in Office for Mac and Web.
Details:
@sumurthy, sorry, maybe it was not clear enough. I use this host: https://appsforoffice.microsoft.com/lib/1/hosted/office.js, so it's the last CDN released version. In comments is tagged as 2.3.0
Just to add to this I'm having the same issue as well except in my case it's the roamingsettings which is being used for Outlook with an Add-In already on the Office store so this doesn't appear to be an isolated incident.
I made a stackoverflow post about it today:
https://stackoverflow.com/questions/57093850/roamingsettings-saveasync-returning-permission-denied-error-on-desktop-only
Facing same problem here suddenly after a recent update
We are investigating the issue and looking at the relation between this issue and a recent fix we rolled out. We'll update this thread with more details as soon as we know the estimated availability of the fix.
Thanks for reporting this issue. We identified a recently introduced regression which impacts users on either the April [16.0.11629.20246] or May [16.0.11727.20244] update. A fix has been made and we are working to get this deployed to the May update. We will update this thread once deployment has completed.
In the meantime, is there a different Office.js URL we could switch our users to, apart from /lib/1.1/hosted/office.js, to provide a temporary fix while certain users are in a broken state?
I'm seeing a similar issue with Excel: https://stackoverflow.com/questions/57137876/settings-api-for-office-add-ins-office-js-is-not-working-in-excel
@jeremy-msft, I really appreciate your work guys, but it's been a week since the issue has been reported. When can we expect the fix? I'm not sure if I should look for a workaround on my own or wait for your release.
We're still waiting for the updated builds to roll out, but unfortunately I don't have an ETA yet. We appreciate your patience and will continue to keep the thread updated.
Hi @jeremy-msft , i also met this problem that Roamingsettings SaveAsync return error '9019' in Windows Outlook build Office Insider 1908(11916.20000) in my add-in. Do you have any solution about it?
@jeremy-msft I can confirm that this has been an ongoing issue with our Outlook add-in from July 15 onward. We've had hundreds of reports from our users hitting this bug as it actually blocks usage of the add-in. Because this issue doesn't seem to be affecting the OWA version, we can direct our users to the web but it's not ideal. I'll be monitoring this issue and I am motivated to help fix this issue if I can be of assistance. This seems to be an issue with newish versions of Outlook desktop on Windows 10/7.
I can reproduce on Version 1902 (Build 11328.20368 Click-to-Run) getting this error:
{"name":"GenericSettingsError","message":"Permission denied","code":9019}
It does not seem to be an issue on Outlook for MacOS if that helps.
Thanks again for everyone's patience with this issue. Version 1907 (build 11901.20176) released today for Monthly Channel fixes this issue and an update for Office Insiders version 1908 will be available shortly.
@jeremy-msft Thanks for the prompt fix. Is there any workaround in the meantime? Being on the semi-annual channel, it will be 6-12 months before everyone in my organization gets version 1907 or higher. So right now it appears my only option is to scramble to update our internal app to use something other than document settings.
@cawise Can you confirm what build your organization is currently on?
Can you confirm what build your organization is currently on?
@jeremy-msft Sorry, I should have included that. A few weeks ago we were upgraded to Version 1808 (Build 10730.20360).

It seems that using the host-specific API still works!
In my case, I can successfully use the Excel API for settings in place of the Common API for settings. This provides a much easier fix than rushing to redesign my app to not use settings at all.
Hopefully this holds true for other hosts, as well.
Hi @jeremy-msft and @sumurthy I'm on the same team as @JefCurtis above.
We need to investigate an alternative fix for this issue as like @JefCurtis stated we have hundreds of affected customers and almost all of them are on annual and not monthly updates. We are a Microsoft Partner and we are really keen to speak to someone involved in the fix.
We are currently using Office.RoamingSettings is there any alternative API that we can use to expedite a fix for our customers?
@jeremy-msft I can confirm that this has been an ongoing issue with our Outlook add-in from July 15 onward. We've had hundreds of reports from our users hitting this bug as it actually blocks usage of the add-in. Because this issue doesn't seem to be affecting the OWA version, we can direct our users to the web but it's not ideal. I'll be monitoring this issue and I am motivated to help fix this issue if I can be of assistance. This seems to be an issue with newish versions of Outlook desktop on Windows 10/7.
I can reproduce on Version 1902 (Build 11328.20368 Click-to-Run) getting this error:
{"name":"GenericSettingsError","message":"Permission denied","code":9019}It does not seem to be an issue on Outlook for MacOS if that helps.
@cawise @JefCurtis Setting API would be broken only if Dialog API were used during the calling flow
@jjhua-github I'm sorry, I'm not following you.
Setting API would be broken only if Dialog API were used during the calling flow
Could you be more specific? Are there links to the Office docs that would help?
Hi @caggers @JefCurtis @cawise, are you able to provide repro steps for how you're seeing this issue happening in version 1902? We want to make sure the problem you're running into is the same as what we've fixed in the original report vs. something else related to settings. Also would be helpful if you can confirm whether the problem has been resolved for you in the Version 1907 build.
@jeremy-msft So I've managed to switch my development version of Office 365 over to the monthly channel using these instructions so that I could test that, indeed, a fix for the error we were receiving when using Office.context.roamingSettings.saveAsync was released. I'm happy to report that it is now no longer return the 9019 error code and is working as expected!
What is the easiest way to provide you repro steps to create this error? I could forward you a manifest file to a custom add-in where you could see the error through the console log when the API method is triggered?
Also, do you know when version 1907 would be released for those on the semi-annual channel?
@JefCurtis - If you could just start by listing the steps you follow to get to this error, that would be useful. Example:
After that depending if the repro is clear enough we may be good to go, or we may ask for a simplified add-in that we can use to reproduce what you see.
Regarding when 1907 will release to semi-annual channels, we don't have dates to share.
@jargil For us, it was fairly straight forward. We are testing using a Business o365 subscription on version 1902.
| Reproduction steps
-- |
roamingSettingsNotes:
roamingSettings. Is there a better place that something like this should be stored? @JefCurtis - thanks for the detailed repro steps! The step I was missing before is the use of the dialog API ("A login (oAuth) window"). With that information I can confirm that yes we're talking about the same issue that was fixed in Main (as you confirmed) and we're looking to deploy to the semi annual channels soon. Unfortunately I cannot confirm an exact date for the update to be available.
Similar situation here. With further experimentation, getting the "internal error" 5001 appears to only happen for me in Excel v1808 when using the message from a dialog like so:
var messageHandler = (msg) => {
var messageFromDialog = msg.message;
Office.context.document.settings.set("foo", messageFromDialog);
Office.context.document.settings.saveAsync();
...
Savings settings outside of that context still succeeds.
I'm not sure I can test v1907, but it certainly seems to be the same issue.
Hello,
We have an excel based office app that’s run mainly on windows machines. From past 3 weeks, we too are facing a similar problem (An error message is thrown while trying to run the app "An internal error has occurred.”).
Our app users run the office app in Windows OS 10 and Microsoft excel 2016 MSO(16.0.4549.1000) 64-bit or Microsoft excel 2019.
We came across a few posts saying the issue has been resolved for office 365 users. I would like to know what is the time frame if any for releasing for MS office downloads as a patch.
Hi @jargil as @JefCurtis said we can upgrade Office 365 and update to 1907 on our in-office testing machines.
But is this fix available for other versions of Office like 2013, 2016 and 2019? So far I haven't been able to similarly upgrade and grab the fix in Outlook 2013. We are working on a new manifest file to send to Microsoft for validation after out last one failed. We are trying to work out which failures were due to this bug.
For Office 2019 the fix should already be available if you have the monthly updates (as you stated with 1907), if you're not in a monthly model then the update is yet to be published.
For Office 2016, the fix is already available: https://support.microsoft.com/en-us/help/4475551/august-6-2019-update-for-office-2016-kb4475551
For 2013 we still don't have an ETA to share.
Hope this helps.
@jargil So yesterday (Aug 13th) there was an update for semi-annual channels. Can you confirm that the fix you described above is included in this release? There is no direct mention of it in the release notes but it does seem to be working on my end. I would like confirmation though as I need to relay this information to a large user base and I want to do it with confidence. Also, does this update apply to all versions of Office or just a subset?
Thanks
@JefCurtis - yes, this update contains the fix. This applies to people in the Semi-Annual Channel (Targeted) 2019, other versions of Office, e.g. 2016 need to apply the KB linked in my previous comment.
The fix for settings is mentioned in the update under the "Office Suite: Non-security updates" section:
Fixed an issue in which Setting API doesn't work in the Office JavaScript library in certain scenarios Learn More
My add-in Store submission has been recently rejected due to this error on Word/PowerPoint in Office 2013 on Windows 7. Checked that and the same issue can be observed on Windows 7 x32 in Word 2013 (1.0.5163.1000).
@jargil We updated both 2016 and 2019 after your post regarding the availability of the update. It was worked fine in 2019 after the update. But for 2016 we still see the same old issue. We did testing in 3 machines with 2016 and all of them showed a similar error.
Below is the updated version for 2016.

@kranti3033 - for Office 2016, you say "similar error". Could you clarify which exact error?
@jargil - For 2016, after updating the excel with the patch provided in the above link .. we are still getting {"name":"Internal Error","message":"An internal error has occurred.","code":5001} error.
We are running version:1907 build:11901.20218 and still get an 'permission denied' error when saving async. This is both 2016 and 2019 clients.
Office.context.roamingSettings.set('apikey', key);
Office.context.roamingSettings.saveAsync( saveCallback );
the error code is 9019.
@geilerdev - please also verify that you're using the latest version of Office.js available from the CDN.
@kranti3033 - the internal error you're seeing was happening on 2019 only and for people on Windows 10 with May's update. For 2016 the fix addresses a permission denied error. Please double check you have the latest version of Office.js.
I'm keeping this issue open while we're only waiting for the fix for Office 2013.
This is the latest status:
Office 2019:
If you're an Office Insider, use 16.0.11920 or newer.
If you're on May's monthly update, use 16.0.11727.20288 or newer.
IF you're on June's monthly update, 16.0.11901.20136 or newer.
Semi Annual 2019, use 16.0.11328.20392 or newer
More info at
https://docs.microsoft.com/en-us/officeupdates/semi-annual-channel-targeted-2019#version-1902-august-13
Office 2016:
https://support.microsoft.com/en-us/help/4475551/august-6-2019-update-for-office-2016-kb4475551
Office 2013: Not yet available.
Additionally you'll also need to make sure you have the latest version of Office.js
@jargil - we load javascript directly from this url: https://appsforoffice.microsoft.com/lib/1/hosted/Office.js
@geilerdev - please open a new issue with all your repro steps and information for us to debug and follow up separately. If you can provide a basic sample add-in that'd be super useful.
@jargil I can confirm that we are still seeing this error in Outlook 2016. The version that I'm testing has been upgraded using this link. We are pulling in the OfficeJS library directly from the CDN provided.
Outlook 2016 version |
-- |
|
Error message from Office.context.roamingSettings.saveAsync |
-- |
|
The reproduction steps are exactly the same as they were before. See this comment.
Let me know if you need more information than I've provided.
@JefCurtis - could you check that the file versions listed in the KB for Office 2016 match the versions you see in your machine where you repro this?
https://support.microsoft.com/en-us/help/4475551/august-6-2019-update-for-office-2016-kb4475551
For example osf.dll should be version 16.0.4888.1000.
@jargil Yes, the file versions do match what is listed in the release notes.
osf.dll as an example |
-- |
|
@JefCurtis - thanks for confirming the version. We're working on redeploying the KB with the proper binaries that contain the fix. I'll post back here once that's available.
We've published the updates for Office 2013 and 2016, please find the links below.
@JefCurtis - could you please confirm that this patch works for you?
Office 2013:
https://support.microsoft.com/en-us/help/4475562/september-3-2019-update-for-office-2013-kb4475562
Office 2016:
https://support.microsoft.com/en-us/help/4475580/september-3-2019-update-for-office-2016-kb4475580
@jargil I'll absolutely test these versions for you but I won't be able to get to them until Monday morning 👍
@jargil
If you're able to provide a copy of Office 2013 (in any form such as trial), I'd be happy to test it out though.
@jargil Is it possible, that after updating Outlook 2016 using this update that the version of OfficeJS has changed and removed support for v1.5 and above?
Some of our add-in functionality was dependent on v1.5 and up so there is a conditional check in the code to confirm that the version of Outlook the add-in is running in does support this version before toggling this feature on. I've been recently receiving reports from some of our users that their version of Outlook (2016) no longer support this functionality even though, before updating, it did work.
I can confirm this:
// before Sept 3rd update
Office.context.requirements.isSetSupported("Mailbox", 1.5); ==> true
// After Sept 3rd update
Office.context.requirements.isSetSupported("Mailbox", 1.5); ==> false
Is this expect behavior? Was there is change to the supported version of OfficeJS with this update?
@JefCurtis - thanks for confirming the update for 2016 works.
That's unexpected given the fix we deployed with Sept's update. Could you please open a new issue to track this new finding? If you agree I'll then close here to mark that we've now fixed the permission denied error.
Once you open the new bug feel free to assign it to me and I'll follow with the subject matter experts.
@jargil Done. Here is the issue. I've no idea how to assign the issue to you (I don't think it's possible) so I've just left you a comment. Feel free to close this issue though.
Thanks! Closing this issue as this specific problem is now fixed.
i am getting same error when calling Office.context.roamingSettings.saveAsync with OWA i have asked question also
value: null
status: "failed"
error: OSF.DDA.Error
name: "GenericSettingsError"
message: "An internal error has occurred."
code: 9019
private saveLoginDetails = async (
userName: string,
loginResponse: LoginResponse
): Promise<any> => {
return new Promise<any>(resolve => {
Office.context.roamingSettings.set("username", userName);
Office.context.roamingSettings.set("loginResponse", loginResponse);
Office.context.roamingSettings.saveAsync(
(asyncResult: Office.AsyncResult<void>) => {
console.log(asyncResult);
resolve();
}
);
});
};
Most helpful comment
Thanks again for everyone's patience with this issue. Version 1907 (build 11901.20176) released today for Monthly Channel fixes this issue and an update for Office Insiders version 1908 will be available shortly.