Can not authorize with password to office 365 calendar

plsnp 21 Reputation points
2020-08-17T13:17:39.177+00:00

Hello,

I'm trying to read my calendar entries and those of my colleagues. This will help to plan work (together with atlassian jira). I register a new app called jira365 for this.

I started reading here, which tells the steps to get started https://learn.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/use-outlook-rest-api#azure-ad-v2-authentication-endpoint

Microsoft Application Registration Portal send me to here https://apps.dev.microsoft.com/?referrer=https:%2f%2flearn.microsoft.com%2fen-us%2fprevious-versions%2foffice%2foffice-365-api%2fapi%2fversion-2.0%2fuse-outlook-rest-api#/appList

Which refered me to the Azure Portal here https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade

There i registered the app, as seen in the screenshot. When clicking on "Endpunkte" (endpoints) i get to see some urls. I use the url that has as description "OAuth 2.0-Token-Endpunkt (v2)" (oauth 2.0 token endpoint v2).

18024-screenshot-2020-08-17-microsoft-azure1.png

I also added access for Calendar as seen in screenshot.

18061-screenshot-2020-08-17-microsoft-azure2.png

Then i started to use postman to test the API. Step by step i supplied the following parameters:
-- A client id set to the name of the app (jira365)
-- A grant_type of which i didn't know which i could choose from. But after a long search i found the documentation here https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/overview/ad-fs-openid-connect-oauth-flows-scenarios Grant type password seemed the simplist to me.
-- A username and password required for grant_type password
-- Scope .. no idea what to fill in here so i just wrote openid as in the examples. Still searching for the documentation of the possible values on the scope parameter.

18051-2020-08-17-15-03-23-greenshot.png

Then when i made the request i get the message (also see screenshot):

"AADSTS700016: Application with identifier 'jira365' was not found in the directory '----------------------'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.\r\nTrace ID: 2ff9fd76-59b4-471e-8bae-0aab7e1c8c01\r\nCorrelation ID: 1d2ca78c-8990-49b7-aa20-a90cf20e8243\r\nTimestamp: 2020-08-17 12:45:20Z  

I'm not sure where to go from here. Can someone give me advice?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,852 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,436 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 25,486 Reputation points Microsoft Employee
    2020-08-18T01:40:47.603+00:00

    Hi @plsnp ,

    You issue is that client id is Anwendungs-ID (client), the Guid, not name of your registered application. Check out https://aka.ms/azurerest and https://learn.microsoft.com/en-us/graph/use-postman?context=graph/api/beta&view=graph-rest-beta for tutorials on calling Azure REST API using Postman.


0 additional answers

Sort by: Most helpful