Hello All,
I need to fetch information from our internal system and display in confluence using a macro.
I am able to get profile information by following this example [microsoft forge ]
I need to pass the Authentication token to my API . But the microsoft.listCredentials()
method throwing not implemented error.
{
hasCredentials: [AsyncFunction: hasCredentials],
getAccount: [AsyncFunction: getAccount],
requestCredentials: [AsyncFunction (anonymous)],
listCredentials: [Function: throwNotImplementedError],
listAccounts: [AsyncFunction: listAccounts],
asAccount: [Function: asAccount],
fetch: [Function (anonymous)]
}
My manifest.yml
providers:
auth:
- key: microsoft
name: microsoft
scopes:
- User.Read
- offline_access
type: oauth2
clientId: *********************
remotes:
- microsoft-graph
- internal-api
bearerMethod: authorization-header
actions:
authorization:
remote: microsoft-login
path: /tenant-id/oauth2/v2.0/authorize
exchange:
remote: microsoft-login
path: /tenant-id/oauth2/v2.0/token
resolvers:
accessToken: access_token
accessTokenExpires: expires_in
refreshToken: refresh_token
retrieveProfile:
remote: microsoft-graph
path: /v1.0/me
resolvers:
id: id
displayName: displayName
remotes:
- key: microsoft-login
baseUrl: https://login.microsoftonline.com
- key: microsoft-graph
baseUrl: https://graph.microsoft.com
- key : internal-api
baseUrl: https://api.myorg.com
permissions:
external:
fetch:
backend:
- https://login.microsoftonline.com
- https://graph.microsoft.com
- https://api.myorg.com
Any help will be greatly appreciated.
Thanks