Highlighted
Regular Contributor.. JonathasSouza Regular Contributor..
Regular Contributor..
324 views

Is there a complete guide to Microsoft Office 365[2.2.1] CP?

I am trying to get a list of all e-mails in one folder but as I am new to Rest API subject I don't know exactly what I are all the prerequisites.

I was able to registry my aplication with Azure AD, get the Tenant,Client ID and secret, access to my company's proxy but when I executed the flow this is what I get after the token operation.

  "error": {

    "code": "NoPermissionsInAccessToken",

    "message": "The token contains no permissions, or permissions can not be understood.",

    "innerError": {

      "request-id": "f9a6f9aa-52b8-407c-a2fd-1f5ef4117908",

      "date": "2019-05-31T13:48:24"

I don't know exaclty what I should do or prepare for this to work, so wanted to know if there is a full guide for this content pack.

0 Likes
5 Replies
Micro Focus Contributor
Micro Focus Contributor

Re: Is there a complete guide to Microsoft Office 365[2.2.1] CP?

Thank you for contacting Micro Focus Forum. 

My name is Carlos Robles, I am from the OO/CSA team. 

 Regarding your question, unfortunately, there is not a complete guide for Microsoft Office 365 [2.2.1] CP. All the information that can provide about the CP is the Release Notes that I attached you below.

I hope that the information provided was helpful.

 

Best Regards,

Carlos Robles.

0 Likes
ivosimic Valued Contributor.
Valued Contributor.

Re: Is there a complete guide to Microsoft Office 365[2.2.1] CP?

I have same error.

"The token contains no permissions, or permissions can not be understood."

Did you find solution?

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Is there a complete guide to Microsoft Office 365[2.2.1] CP?

Hello everyone,

Considering that all the steps up to this point are correct, the next action is to grant access rights.

In order to grant the correct rights:

  1. Login as administrator to  Azure Portal

    https://portal.azure.com/#home

  2. Got to App Registrations

    https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade

  3. Select your application
  4. Go to API permissions menu
  5. Select Add Permissions and then Microsoft Graph
  6. Expand the permissions and select the ones documented in the description of the operation that you want to run, then click Add Permissions on the bottom of the page.
  7. Return to API permissions and click the Grant admin consent button found on the bottom of the page.

Please note that Web/API type apps work with Client ID/Client Secret while Native type apps work with ClientID/User/pass.

Please share your point of view on how this type of information should be structured/documented in order to be easily understood.

Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Is there a complete guide to Microsoft Office 365[2.2.1] CP?

Adding a bit more information.

A Get Auth Token call to a Native type App would look like this:

loginAuthority https://login.windows.net/example.onmicrosoft.com/oauth2/token
resource https://graph.microsoft.com
loginType Native
clientId c9f97ce5-e5ca-1111-2222-83examplea5b
clientSecret  
username user@example.onmicrosoft.com
password ********

 

A Get Auth Token call to an API type call would look like this:

loginAuthority https://login.windows.net/example.onmicrosoft.com/oauth2/token
resource https://graph.microsoft.com
loginType API
clientId c9f97ce5-e5ca-1111-2222-83examplea5b
clientSecret VFD?.>M2S-example={81-lt4&-5=}.(P%#;WR
username  
password  

 

You can try a simple call using the List Messages operation where you provide the generated token as well as the email address of the Inbox that you want to list, like in the example below:

authToken eyJ0eXAiOiJKV1QiLCJub25jZSI6Ikexample
userPrincipalName john_smith@example.onmicrosoft.com

 

If everything is set up correctly you will get a valid response.

ivosimic Valued Contributor.
Valued Contributor.

Re: Is there a complete guide to Microsoft Office 365[2.2.1] CP?

Tnx for information.

Since this post was outdated and with no response for long time i have created new discussion.

i have completed all steps fro you reply.

More info on my flow in problem you can see in discussion "Office 365 and NoPermissionToken".

 

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.