Is there a method to fetch individual users added to Confluence space - confluence

I want to retrieve all the individual users mapped to a Confluence space along with the permission granted to them. Is there a method to achieve the same via REST API?

Right now there is no way to get permission info on a space using the REST API.
An option would be to write your own Rest Service (using the Atlassian API diretly or via Scriptrunner) and query that.
A 2nd option, yet a bit cumbersome would be to call the permissions page of the space admin, and use webscraping to get the users and groups, and then expand the groups to get all users in these groups.
Please keep in mind that you might get all confluence users for some spaces which might cause a problem.
Why do you need this information? Maybe there is another way to solve your problem?

Related

Create Teams meeting by Microsoft Graph or other means

I'd like to create MS Teams meetings from another application.
The Teams application is running on the computer, outlook is not used though.
How would I accomplish this the best / easiest way without (much) user interaction?
As far as I can see, the best option would be to use the REST API to create a meeting using the api-URL https://graph.microsoft.com/v1.0/me/events.
If I can also create a meeting commandline or by COM objects or something else, I could do that, too.
So here would be what I did for research with graph so far:
I can log on to https://developer.microsoft.com/en-us/graph/graph-explorer and use my user to create meetings and get the response. To do that, I modified the permission to read / read-write the calendar. If I copy the access token and use it with a powershell Invoke-RestMethod, it also does what I want. I can do the same with Connect-Graph -Scopes "Calendars.ReadWrite". But it would show this big browser windows about the login as X.
I read about apps, but if I use the apps ID and so on to log in silently, it seems like I am not in the current user scope but in a process scope and that's different. At least I set the API permissions up to also have access to Calendars.ReadWrite via Microsoft Graph, but I get an Access denied error if I try to run the same New-MgUserEvent to create a meeting for the current user (that is running the local powershell).
If use the token with Connect-MgGraph, it displays the client and tenantID and the ContextScope is process, not current user, so that would fit.
If I understand it correctly, I could use the token to get another one for a user... (reference is this: https://learn.microsoft.com/en-us/graph/auth-v2-user )
If I use the Connect-Graph -ForceRefresh parameter (which I guess would do the same, the popup tells me I'm logged in as the current user (not process).
This is a bit odd, so before I try to use the rest api and fumble a bit around:
Can I use the example from the link to refresh the token to get a user token that has the rights that I defined (and be able to access the calendar)?
Or is there some misunderstanding on my part?
Would it be a better idea to just use something like powershell, have the user log in once per day and leave the process in the background and create the new entries from there?
Do you have to refresh a token when you use connect-graph? Or could that be done better by Rest web api, if I can export the token?
The idea of having an app that would have access to all calendars would seem like a bigger security risk and I'd kind of want to avoid that. If I could configure the apps to have access to only one specific calendar, that would be cool, too. But I did not find it when looking around.
Thanks and best regards to all that took their time to read and consider to help.

Creating a user who can only access a single page

I am currently writing a script which has to curl a certain confluence page and parse it. Now I want to place the credentials directly into the script.
Therefore I need to create a Confluence user which is only allowed to read that single page. Is that possible (without having to manually restrict all other pages)?
Alternatively (2nd best): Is it possible to make one single page readable without login?
The best I found until now is a user which is only allowed to read one space.
create a new account e.g. foo https://yourdomain/admin/users/createuser.action
remove default membership of that account to any groups https://yourdomain/admin/users/editusergroups-start.action?username=foo
allow user to use confluence https://yourdomain/admin/permissions/editglobalpermissions.action
allow user to read the space the page is in https://yourdomain/spaces/spacepermissions.action?key=yourspace

Confluence: best way to add public restrictions of a page

Currently we have a user guide sitting in Confluence. We want to give access to this page to all users of the product. What is the best way to do this?
Do I put the user guide into its one space and make it public. Then would I need to make a group defining all my users on our product?
It would be ideal if the users did not have to log into confluence in order to view the user guide. The most important piece is we do not want to give access to the user guide to everyone to view.
If you want to grant access to the users of that product, you need to create a group, and then, give access to only that group. If users don't need to log into Confluence, then, anyone could access.
Another approach is to use Comala Share It (disclaimer, I work in Comalatech). This add-on allows you to create a unique URL, which could be shared with the users of your product, so only them could access. Of course, if the URL is shared with anyone outside the group, that person could access too. Guess the public URL is not possible, since it uses a secure token.
Regards,
Gorka

How To Use SharePoint 2013 REST API In Order To Remove Contribute Permission On List Item

I want to break the roleinheritance with the SharePoint REST API on a single list item. This can be done using http:///_api/Web/Lists(guid'listid')/Items(itemid)/breakroleinheritance(false).
I am using false as parameter in order not to copy the permissions from the list.
The next goal is to assign reader permission to couple of groups and users (I have the Ids of the users and the groups)
But the next step is more complicated. I must use POST requests in order to update/add permissions and cannot find examples on this.
Any ideas are much appreciated.
Thanks.

Giving user option to select extended permissions

I'm making a application for facebook that will be used for academic research. Right now when the user goes to install the application I'll request additional information which is stated in the extended permissions.
I would perfectly understand someone not wanting to give out certain aspects of this information (It's just used to gather statistics about people taking part , education, religion etc.)
Does anyone know the best way to filter the permissions? For instance maybe someone is willing to give their age but not education. Therefore can I remove the education request from my application install request dynamically?
If you want to ask the user for only those permissions that he wants to give, you can take input from him before redirecting to Facebook login. You can generate the url for requesting permissions based on this custom set of permissions using the 'perms' attribute of the <fb:loginbutton /> tag or pass the list of permissions you want to the $facebook->getLoginUrl(array('req_perms' => $perms)) call.
To keep track of permission changes, you can use the realtime updates offered. You can know more about it here.
You certainly could build an up-front permissions matrix that the user could cherry-pick from. And that would probably be the way to do it, since you can't do anything to customize the permission challenge that the Facebook Platform generates.
The trick would be keeping track of which permissions the user granted in the given access token you'll receive from back from the Platform. Especially since users can change the permissions granted to your application w/o visiting the application itself - so you'll want to be hooked in to that info via the Real Time Updates.