How to get the login username in Windows Admin Center's custom extension - wac

Windows Admin Center Settings shows Signed in account name. Can we retrieve that account name via AppContextService? or is there anyway to get the login username within the Windows Admin Center's custom extension?

I am not sure if there is an extention that shows you shows Signed in account name via AppContextService, but you might consider building your own tool extension.
Here is where you can start
https://learn.microsoft.com/en-us/windows-server/manage/windows-admin-center/extend/prepare-development-environment

Related

How to get the distinguishedname(DN) of an user using ADSi in C++ code?

I created one web application. In that web app the login details are authenticated using ADSI API in c++. And the user details are stored in windows server 2016 Active Directory. I have two types of users Admin and normal user but I have only one login page. So how do I check whether the entered user is an Admin or Normal User. But the ADsOpenObject() have to open only once.
My 1st question is how to get a distinguishedName(DN) of a particular user using c++ code?
and 2nd question is how to know whether if a particular user is belong to Admin OU or User OU?
Thanks in Advance.

How do I choose a different support email address when registering a Google OAuth app? [duplicate]

I created new Google Play game and would like to change the email displayed on Google Consent Screen. Google Developers Console screen has a dropdown to choose email, but just one - admin's email - is here. I've added another user as the owner, but it is not appeared on the consent screen.
If you want to change the email address that is displayed to the user you have to:
Add permission for the new email address to handle the project: Menu > IAM & Admin > IAM, then click on the Add button, enter the email address and select Role > Project > Owner
Accept the invitation from the new email address. Check your emails, click on the confirmation url and accept the terms and conditions.
Log in to the Google Developers Console using the NEW email address. Only the new email address can change the displayed email address. You don't have to log out or open an incognito window. You can simply add a new account by clicking on your account photo (upper-right corner) and then selecting the Add account option.
Tip: When you visit the page, you will be logged in with your primary account by default. If you want to be logged in with the second account you just created, simply append &authuser=1 to the end of the url. If you have more than 2 accounts, you can use the value authuser=2 or 3 and so on. (The default value for your primary account is 0.)
You need a second email address then add that person / email as admin of the project. Then you will be able to add that email in the consent screen.
The Console has changed a lot since 2014, You need to add another user as the admin then you must login to console with that email and connect it. Then you will be able to change it.
A new user can be added via the Iam for your project.
While the above solutions work, I didn't want to make my support#my-company.com a Project > Owner of my GCP project since multiple people can potentially access it.
The page (https://console.cloud.google.com/apis/credentials/consent/edit) says that the permission needed is clientauthconfig.clients.update
So I made a Custom Role containing every permission in that category:
clientauthconfig.brands.create
clientauthconfig.brands.delete
clientauthconfig.brands.get
clientauthconfig.brands.list
clientauthconfig.brands.update
clientauthconfig.clients.create
clientauthconfig.clients.createSecret
clientauthconfig.clients.delete
clientauthconfig.clients.get
clientauthconfig.clients.getWithSecret
clientauthconfig.clients.list
clientauthconfig.clients.listWithSecrets
clientauthconfig.clients.undelete
clientauthconfig.clients.update
and gave my support email that Custom Role + the role Project > Viewer
One note, these permissions are not finalized yet. The 'Create a Custom Role' page gives this warning:
Not recommended for production use
These permissions might be changed
in backward-incompatible ways and are not recommended for production
use. They are not subject to any SLA or deprecation policy.
You can go here https://groups.google.com/ and create a group. Then simply refresh the consent page and you'll be able to pick the group. It is not your custom domain but it does the job I think.
There is a way to choose email without creating a new Gmail account and giving it Owner permissions. You can create a Group in GSuite with public email and then configure the group's forwarding to the email you want.
For example, you want to use support#company.com. You can create a group support.google#company.com which will forward everything to support#company.com
Then, you will be able to pick up support.google#company.com in the dropdown.

Djangae Gauth integration

I'm following the "Gauth authentication" portion of Djangae's documentation but I'm running into some unexpected behavior.
I've configured urls.py and settings.py as specified by the documentation (the current settings are mostly a result of using the Djangae Scaffold) but at no point are users prompted to authenticate using or link their Google account. I've tried un/setting DJANGAE_CREATE_UNKNOWN_USER but this has no impact.
I've also tried running commands inspired by sitepackages/prod/djangae/contrib/gauth/tests.py in my local shell in order to verify that the back-end configuration is correctly configured and that users can actually be authenticated against AppEngineUserAPIBackend but that fails because my User model (djangae.contrib.gauth_datastore.models.GaeDatastoreUser) seems to be missing required attributes: AttributeError: 'GaeDatastoreUser' object has no attribute 'user_id'.
So, am I misunderstanding how this is all supposed to work and must take some additional steps to get Google Sign-In working? Or have I (likely) misconfigured my application? (I'm happy to include genericized versions of my config, but as I said, they've come directly from Djangae Scaffold or the documentation.)
UPDATE: Interestingly, if I remove the --headless flag from my Behavior suite config, I see the expected behavior. The browser (Chrome) is being redirected to https://accounts.google.com/Login?continue=http%3A%2F%2Flocalhost%3A8080%2F
Environment:
Djangae (0.9.11)
Django (1.11.19)
It turns out that this is the expected behavior. In the local sandbox, users are prompted for an email address and (by default) a "user" is created for them and they are automatically logged in.
From App Engine's "Users Python API Overview" document:
Google accounts and the development server
The development server simulates the Google Accounts system using a
dummy sign-in screen. When your application calls the Users API to get
the URL for the sign-in screen, the API returns a special development
server URL that prompts for an email address, but no password. You can
type any email address into this prompt, and the app will behave as if
you are signed in with an account with that address.
The dummy sign-in screen also includes a checkbox that indicates
whether the dummy account is an administrator; that is, whether the
account has the the Viewer, Editor, or Owner primitive role, or the
App Engine App Admin predefined role. If you check this box, the app
will behave as if you are signed in using an administrator account.
Similarly, the Users API returns a sign-out URL that cancels the dummy
sign-in.
The unique ID for a User object in the development server is
calculated from the email address. Two unique email addresses always
represent two unique users in the development server.
Personally, I think this design is very flawed. I don't know what Google thinks about the Twelve Factor manifesto, but this behavior is a flagrant violation of article 10 (Dev/Prod Parity), which is summarized as "Keep development, staging, and production as similar as possible". I see no reason why the full auth/redirect flow wouldn't work in the local sandbox and, at the very least, users should be able to opt into it. (I would love to find out that this is an option.)
The most concerning part about this conditional behavior is that the user object's API is different, which is why I was seeing the error mentioned in my question ('GaeDatastoreUser' object has no attribute 'user_id'). The local user also has no nickname method.

Any way to get "Employee Details" from Google API?

Is anyone aware of any Google API with the user scope (NOT the Admin API in the Directory SDK) that allows you to retrieve the custom employee attributes?
The G+ API seems to skip these
https://developers.google.com/+/web/api/rest/latest/people#resource
Our issue is that we don't want to grant access to the developer console, but rather do this PER-USER. I.E. a user logs into our app and we display to her the custom attributes for her G Suite account, but we do this as her (not as an approved API scope via the dev console).
Leaving this answer for anyone like me who finds this question.
The Directory API allows a user to query the custom attributes for their account even without any admin permissions at all.
https://developers.google.com/admin-sdk/directory/v1/reference/users/get
You need to ensure that projection is set to full and viewType is set to domain_public.
You may need to check the permissions for reading the custom attributes to ensure that a user is allowed to see theirs. We do this in the Google Cloud Directory Sync.

WSo2 logged in user changes automatically

I have user in wso2 Identity server , say "abcd" (In Primary domain), configured LDAP domain Also. but there is no user with "abcd" as Id.
when I try to login for Wso2 IS management console Initially it will show as Signed-in as:abcd#carbon.super , but after some time it is showing as Signed-in as: LDAP/abcd#carbon.super.
Mostly we saw when we try it from more than one console with same user name.
why this error?, any known bug or feature?, I'm using wso2 IS 4.5.
Actually we are not aware about such issue. Thanks for letting people know about this. Did you experience any issues with the functionalities? Or this is just only show in the UI... AFAIK, this Domain name append to user name, user session contains an some attribute called "DoomainName". I guess, some how this value may have been set in to the session.