Hi @Louis CI Lo ,
I tried searching a lot but so far haven't found useful information about how to know Exchange oAuth Metadata is updated. Haven't' seen in any document stating if this could be traced by any logs or event id, either. But I'd recommend have a look at the event viewer right after you run the command to see if a relevant event could be recorded out there.
Regarding your concern about whether this metadata is refreshed automatically, I've also done much research but didn't find evidence which can prove this.
However, found an earlier thread which also mentioned that the outdated oAuth Metadata required to be manually updated using the command Set-AuthServer -RefreshAuthMetaData
:
Then I went through the document which includes the explanation of the RefreshAuthMetadata
switch, it says "The RefreshAuthMetadata switch specifies whether Exchange should refresh the auth metadata from the specified URL. ", while doesn't mention anything about if normally the refresh should occur automatically or use any wording like "force refresh" which to some degree might indicate usually it is done automatically.
So taken in the round, I am assuming this could be normal that we need to manually refresh the auth metadata using the aforementioned command. And in this case, personally I would suggest trying to create a scheduled task in your environment so that this command can be run backend periodically.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.