You only need to configure this if you are hosting ManicTime Server yourself. This does not apply if you are using ManicTime Cloud.
If you do not have a Azure Portal account, then firstly you need to make an Azure Portal Profile (Link). You will have to enter your credit card info (Microsoft's requirement), but the service needed for this configuration to work is FREE (Azure Active Directory).
Once you have your Azure Portal account, go to Azure Active Directory.
Register an App
Microsoft Azure Active Directory |
Then click App registrations on the left side menu.
Register app |
Next click New registration at the top.
New registration |
After this you will need to fill some basic info for your new App. For name pick anything you want. For the Supported account types you will need to choose which Microsoft accounts will have access to Office 365 calendar connection on ManicTime server. You can read more about what is a tenant here. But to work 100% every time you can choose option Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
You can just leave the Redirect URI field as it is. And click register.
Input app info |
In the next step you will need to create Client credentials. So click on Add a certificate or secret on the top left side of the screen.
Add new Client secret |
Then go to the Client secrets tab and click New client secret.
Create Client Secret |
A window will open on the right side, where you will have to input a name for Client secret and when it expires. You can choose whichever value for the Expires field, just note that the connection on ManicTime Server will stop working when the secret expires and the users will have to connect again to the Office 365 connection on ManicTime Server. But more on this later. Then click create.
Configure client secret |
You will see a value for client secret and its id. You need to save it somewhere secure, as Microsoft will not let you see it again. Client Secret value needs to be copied to ManicTime Server Office 365 calendar configuration screen to Client Secret field.
Created client secret |
Next thing to do is you can copy Client Id and Secret to ManicTime Server Office 365 calendar configuration screen. You already have Client secret, and you can see Client Id, if you go to the Overview tab in Microsoft Azure. It is written near the top center. It is defined as Application (client) ID;
Client Id |
Copy the Client Id and Secret to their respected field in ManicTime Server Office 365 calendar configuration.
Copy Client Id and Secret to Office 365 configuration |
Next, you will add a Redirect uri from Manictime Server Office 365 calendar configuration to your app on Microsoft Azure. Just go again to the Overview tab and click Add redirect uri. It is under the Add a certificate or secret field, which you needed before. You will be taken to the Authentication screen where you will click Add a platform.
Add platform |
A screen will open on the left side, where you click on the Web square and on the next screen you will copy the redirect uri from the ManicTime Server Office 365 calendar configuration screen to the Redirect URIs field. Do not change other fields.In ManicTime server you will see a list of possible redirect Uris. Normally the first is correct, otherwise one of the other specified should work (You will be able to test the configuration, which we cover later in the article). And then click Configure.
Copy redirect uri from Office 365 configuration |
Copy redirect uri to Microsoft Azure |
One last thing to do is setting up the API permissions. Again go to Overview tab and on the bottom you have a View API permissions. Then click Add a permission. Then click Microsoft Graph(the first big rectangle).Then click Delegated permissions. And then search for offline_access and OpenId permission and enable them. Then search for the Calendars.Read permission and do the same. Then click on the Add permissions button on the bottom.
Search for permissions |
That is it. Now you only need to save the configuration, or you can click Test connection to see if the connection is set properly and then save it.
If you click Test connection, you will go through the authentication process, like all users who will try to connect to Office 365 calendar.
Test Connection
Firstly you will see a screen, where you need to authenticate.
Enter your account email and password |
Then you will see a screen that says that the app is not verified. But no worries just click continue, because you created the app and we are certain that you trust yourself.
Not verified app |
Hopefully that the next screen you will see will be green which means that everything is working as it should, otherwise you can contact ManicTime Support and we will be happy to help you.
Success screen |
Deleting or editing configuration
You can change Client Id or Secret in Connections configuration next to Office 365 calendar click edit. Any changes to Client Id or Secret will delete existing connections for all users.
If you delete the configuration all users data will be also deleted.