msGraph API from msAccess VBA - Planner plans credentials issue

前端 未结 1 1306
别那么骄傲
别那么骄傲 2021-01-21 11:27

I am very new to MS Graph and Office 365 and have made good progress. I am an O365 Global Admin for my organisation (a school) and have app development experience. There is a lo

相关标签:
1条回答
  • 2021-01-21 11:40

    1. Do my permissions look right?

    Yeah undoubtedly, your azure portal permission seems alright. You need dedicated permission for that also need to grant admin consent which you have done perfectly shown on screen shot.

    2. Is my authentication flow correct?

    As you are using Client Credentials Grant Flow request format seems alright. But I doubt this flow is suitable for the API you are trying to call. because this API requires dedicated permission.

    3. Should I be using these instead?

    Since this API need dedicated permission you could use authorization code grant flow.

    Follow below steps to get your token using Authorization Code grant flow

    Get Authorization Code:

    https://login.microsoftonline.com/YourTenant.onmicrosoft.com/oauth2/v2.0/authorize?client_id={ClientId}&response_type=code&redirect_uri={redirectURI}&response_mode=query&scope=https://graph.microsoft.com/.default

    Request Token oauth2/V2.0/token with your code:

    Request URL: https://login.microsoftonline.com/common/oauth2/V2.0/token Or https://login.microsoftonline.com/YourTenant.onmicrosoft.com/oauth2/V2.0/token

    Method: POST

    Request Body Format

    client_id:Your_Clinet_Id
    scope:https://graph.microsoft.com/.default
    redirect_uri:Your_Portal_Redirect_URI
    grant_type:authorization_code
    client_secret:Your_Client_Secret
    code: Paste Code Here
    

    Decode Token:

    You could decode your token on https://jwt.io/ and make sure you have required permission on your azure portal.

    4. Have I been working from old information?

    No, Information has no issue so far I have gone through.

    Note: For for details implementation of Authorization Code grant flow you could take a look official docs

    0 讨论(0)
提交回复
热议问题