update display name of a member with GAM or admin sdk api - wiki

I would like to set or to modify display names of members subscribed to groups I'm managing (see attached picture).
I need to do that by Groups Migration API or GAM. But members object don't include that information!
I try to execute following command:
gam update group test-group add member user "Pippo Paperino" pippo.paperino#email.-it
this don't work. :-(
Does anybody knows how to do that?
{
"kind": "admin#directory#member",
"etag": "\"enlFCt4L0xxxzRNl5h_fsrc/PLoDCCsd1WkZFMzGD8Xvw7uzSCQ\"",
"id": "109503944206647999229",
"email": "pippo.paperino#email.it",
"role": "MEMBER",
"type": "USER",
"status": "ACTIVE",
"delivery_settings": "ALL_MAIL"
}
enter image description here

A member of a Group can be a user or another group.
If the member of the group is a user, the display name corresponds to the name the user has in the Google Account (the fullName, which is formed by concatenating the givenName and the familyName): check User resource . You cannot update the display name in Groups directly. If you want that display name to change, you would have to call Users.update in Admin SDK > Directory API, and provide a new user's familyName and givenName. But bear in mind that this will change the user's name everywhere, not just the display name in that group.
If the member of the group is another group, the display name corresponds to the name property in the Group resource. If you want to update that display name, you would have to call Groups.update and provide your desired display name. Of course, this will change the display name not just in that group, but everywhere.
Reference:
Members
Groups
Users
I hope this is of any help.

Related

How to restrict user from accessing pages in Oracle Apex

I am very upset with this oracle apex, their is no proper practical example or demonstration on Oracle Apex
I have built one application where I have 4 pages -> Home , My account , Calculate gross
If my Role : Admin and Name : Raj … I should have access to all my above pages
If my Role : user and Name : Bob … I should have access only to page : Home and Calculate gross and remaining pages should be hide
Following is my table details : employee
Name , Age , Role
Raj , 24 , Admin
Bob , 26 , User
Note : I am using SSO login
You should create authorization schemes - it is done within "Shared components" section. For example, you can create the one whose name is "full_access", its type is "PL/SQL function returning Boolean".
Code depends on what "role" and "name" actually represent; I presume that they are stored into some table. In that case, and if you created Apex users whose username matches name you mentioned (e.g. Raj and Bob), that would be
declare
l_role t_users.role%type;
begin
select t.role
into l_role
from t_users
where name = :APP_USER; --> APP_USER is username of currently logged user
return l_role = 'Admin'; --> if role is "Admin", function would return TRUE
end;
(Feel free to improve it.)
Then go to the page itself, check its (page's) properties - scroll down to the "Security" section and set the "Authorization scheme" property to "full access".
Doing so, any APP_USER whose role isn't "Admin", won't have access to that page.

How to add an inventory host to specific group using ansible tower API? So that it will display on related groups list on UI

I am unable to assign a host to group in ansible tower inventory using rest API's. Any one have worked on it please let me know the request with body.
I found a solution. For me, the problem was that I was searching in api/v2/inventories/{id}/groups/; turns out you actually have to look in api/v2/groups/{id}/hosts/.
Add host to inventory group
URI: {your host}/api/v2/groups/{id}/hosts/
Method: POST
Payload:
{
"name": "{hostname}",
"description": "",
"enabled": true,
"instance_id": "",
"variables": ""
}
This will create a host in the specified group.
In AWX and Ansible Tower, you can navigate to the url in your browser, then you can scroll all the way down, and if you can do a POST, there'll be a form there that has the payload. You can fill it in and post it right there in the browser.
When you are at the inventory group in the normal GUI, you can find the id of the inventory group in the URL.

Get list of users with name, phone number and group memberships from G Suite

I have looked into the G Suite admin APIs and found this function:
GET https://www.googleapis.com/admin/directory/v1/users
I get a list of all users, but no users in the list have a phone number. How can I include the user's phone number in the list?
I would also like to know how to get a list of every user's group memberships if this is possible.
The phone number property is under user Resource which you might have missed since it's also located in the Users.list under Response.
{
"kind": "admin#directory#users",
"etag": etag,
"users": [
users Resource
],
"nextPageToken": string
}
which when you click leads to the full User Resources which then contains the phones property including others.
"phones": [
{
"value": string,
"primary": boolean,
"type": string,
"customType": string
}
],
"phones": string

facebook group members Bio information

I am interested in retrieving a Facebook group members' Bio information.
I have created an app where I have requested permission of about user_about_me and the app is under review for submission.
I have coded for the app in JSP but it can only select name, gender, last_name, first_name only. It is not selecting the Bio information.
I face the same problem even in the graph API explorer, when I use
{group_ID}/members
I can retrieve list of all group members. But I can not see more details than the following:
"data": [
{
"name": "name",
"administrator": false,
"id": "USER ID"
},
..
When I click on the ID (or enter the ID in the explorer), I can only get the following:
{
"id": "member_ID",
"first_name": "firstname",
"last_name": "lastname",
"link": "https://www.facebook.com/app_scoped_user_id/...",
"name": "name ",
"updated_time": "2015-02-07T10:02:58+0000"
}
This is not showing the Bio information.
when I enter the following:
{member_ID}?fields=bio
I just get
{
"id": "10153223503039309"
}
I will appreciate if someone please identify me the problem. I believe this problem will also solve my code problem, where at the moment I am unable to retrieve the group member's Bio information too.
Is it possible that the problem will be resolved after the app's acceptance, which is under review?
Thanks you very much.
Syed
You can´t just grab more information from the user just because he is a member of some group. You would have to let him authorize your App with the correct permissions in order to get more data.

I can't read from group wall

I can read users feeds or posts
https://developers.facebook.com/tools/explorer?method=GET&path=me%2Fposts
but when I try to reach a groups feed or posts, I can't. I added auth part but it returns empty JSON. From the groups I tried, one was closed and 2 other are open groups.
https://graph.facebook.com/228955270470492
The above returns this:
{
"id": "228955270470492",
...
"name": "ADI BİLİM",
"privacy": "OPEN",
...
}
Requesting this feed
https://graph.facebook.com/228955270470492/feed?access_token=AAACEdEose0cBAACgceqTZCBg0YA7MifDP02MKVXpZCipHJNHmHqK5OTzDvJaNke2JDxhOxKOTFl6bPOoZCZAdUZAQFFV6lD8GCMTxQHigUQZDZD
results in empty:
{
"data": [
]
}
What I am doing wrong?
This is working fine for me, is your access token for a user who's a member of the group?
If not, the group needs to have visiblity OPEN. You may also need user_groups permission for the user, but I'm guessing you already have that if you're accessing the user's list of groups
Even this group is public I need to auth app "read_stream" from extended permissions. Now I can see feeds :)