Selecting Single Tenant to add Scopes to Xero API - xero-api

I've successfully connected to the Xero API using the official SDK.
I'm trying to add a Scope for WorkflowMax but I get the following error:
Sorry! APPNAME has requested an invalid combination of scopes.
Please ensure that all scopes requested relate to a single type of
tenant.
I have 2 organisations in my account and WorkflowMax is only active on one of them.
The documentation here doesn't seem to have an option for specifying which Tenant ID or Organisation the app should apply to.
I assume that if I only had one organisation, adding the scope workflowmax wouldn't cause any issues but because this add-on is only active in one organisation I can't get my app to authorize with the additional scope so I am stuck and hoping someone else has found a solution as I can't find anything here or in the Xero Developer Community.

Related

Azure ad graph api

I'm testing Azure Graph API.
and I'm trying to find an API that allows me to retrieve only users that are assigned to a specific app I created.
In app registration page, I gave a user.read.all permission, but the get user API gives me all users that are in the AD and not only that are assigned to the app I created. Should I change the permissions? or to access an another API?
Does anybody know what to do?
Thanks
Additionally, This object id should be based on service principal and not the application registration here.
You can retrieve the object Id from Azure AD->Enterprise Applications->Your app->object ID.
You need to have at least Application.Read.All and Directory.AccessAsUser.All for delegated permissions or Application.Read.All for application permission based on user or application context.
For specific details, you can add $select parameter to show only the displayName of the users assigned to the app.
https://graph.microsoft.com/v1.0/servicePrincipals/{object Id}/appRoleAssignedTo?$select=principalDisplayName
As a workaround you can use the below graph API to get the list of users.
https://graph.microsoft.com/v1.0/servicePrincipals/{ObjectID}/appRoleAssignedTo
Note: The above graph API gives the Object Types User and Service
Principle as well
As discussed in the MS Q &A Platform This endpoint currently does not support filters based on appRoleId. In fact, except that the id parameter can be filtered, the three parameters appRoleId, principalId, and resourceId do not support filtering. Similar issues have been raised before.

Microsoft Graph and Partner Center in the same api gran

I am looking to create a login that verifies a user account via the graph api and also verifies they are a microsoft partner via the partner api. I can easily get one grant or the other but can't seem to get both to work in one grant. I would rather not force the user to approve two different app approval boxes.
Is this possible:
scope=https%3A%2F%2Fapi.partnercenter.microsoft.com/user_impersonation%20https%3A%2F%2Fgraph.microsoft.com/openid+profile+email
as per the limitations of azure ad, I don't believe you can request multiple scopes from different external resources like you're doing there. you will have to do two different requests. the token should stack with the resources, but you cannot call them both in one go. so no, that scope= you provided probably won't work or will only return the first scope.
Similar type question for reference.
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/1390

how to retrieve templates for different user accounts

I have one account in docusign which has 3 users for it. We have a requirement of retrieving templates of users for that account. The Template:List API is retrieving all the templates of the account. There is also one path parameter named user_id but it is not retrieving the templates of particular user account instead it is retrieving all templates.
Is there any way through Rest API we will retrieve list of templates of user account?
If there Please provide the Rest API details or link.
From my own testing, it appears you're right. This could be a bug, I'm not sure and I'll follow up but this may take time.
Two possible workaround.
Make the API call in the context of the user that you wish you get templates. Basically, you'll need to obtain an accessToken for the API for that user. With JWT that is very simple, just use the userID when you ask for the token (but you do have to get consent).
Filter the list of templates you get. The list does include information about the owner of the template (again, userID) but you'll get all of them and have to do the work to find the ones you want.
(Update 5/26/2020: confirmed with engineering this is a bug. It is tracked under TT-3290).
(Update 6/23/2020: bug was resolved, will be deployed shortly)

Oauth error missing_shopify_permission: read_all_orders

When i mentioned scope read_all_orders . I faced the following error while installation
Oauth error missing_shopify_permission: read_all_orders
Without read_all_orders scope App install perfectly.
I dont know what happens exactly i am trying both new created store and 2 month old store
My scopes :- 'read_products', 'read_orders', 'read_customers', 'write_orders', 'read_price_rules', 'write_price_rules', 'read_all_orders'
As per Shopify documentation
read_all_orders
Grants access to all orders rather than the default window of 60 days
worth of orders. This OAuth scope is used in conjunction with
read_orders, or write_orders. You need to request this scope from your
Partner Dashboard before adding it to your app.
To do so
read_all_orders access:
From your app's overview page, click App setup.
In the Orders section, click Request access to all orders.
Provide a description about why you are applying for access.
Click Request access.

Account Linking - multi-tenant application

Planning on creating a Google Assistant Application that allows our customers to access business data. The problem I am having is understanding how a given user would link his account to his "instance" of our multi-tenant solution. I think the deeper problem is know which Tenant URL to associate with a particular account. I know I can implement the Accounting linking using Oauth, I have just yet to see how this could work with a single Assistant App accessing multiple tenants depending upon account.
You can get additional info from the user, by asking him, and save that in your context, and then you can request for a sign in. this way, during the sign in process, you can use the context to sign in the user into the proper tenant