Re: OAUTH2 Problem with AzureAD

2022-05-03 Thread Yogesh Mahajan
Hi Asmita, Thank you for the blog post. Blog is live on https://www.pgadmin.org/. Thanks, Yogesh Mahajan EnterpriseDB On Sat, Apr 30, 2022 at 2:14 PM Asmita Thapliyal wrote: > Hello Yogesh, > > Please check the blog post below and let me know if anything else needs to > be added there. > > ht

Re: OAUTH2 Problem with AzureAD

2022-05-03 Thread Asmita Thapliyal
Hello Yogesh, Please check the blog post below and let me know if anything else needs to be added there. https://medium.com/@asmita.thapliyal/how-to-configure-oauth-2-0-with-azure-ad-in-pgadmin4-2c1500d52d9d Regards, Asmita On Fri, Apr 22, 2022 at 2:29 PM Yogesh Mahajan < yogesh.maha...@enterp

Re: OAUTH2 Problem with AzureAD

2022-04-22 Thread Asmita Thapliyal
Hello Yogesh, Thanks! I would like to write blog/documentation for configuring Azure AD OAUTH2 authentication with pgadmin. Please let me know if I could add it here - https://www.pgadmin.org/blogs/? May be under the post- "How To Configure OAuth 2.0 in pgAdmin 4" or create a new one. Regards, As

Re: OAUTH2 Problem with AzureAD

2022-04-22 Thread Yogesh Mahajan
Hi Asmita, You can write the separate blog 'How to Configure OAuth 2.0 with Azure AD in pgAdmin4' which includes detailed steps about App registration in Azure. You can send a blog over the same mailing list. The Community will publish it on the pgadmin website. Thanks, Yogesh Mahajan EnterpriseD

Re: OAUTH2 Problem with AzureAD

2022-04-21 Thread Asmita Thapliyal
Thanks a lot. I was facing some minor issues with your code. Below lines of code works. email = None if 'email' in profile: email = profile['email'] elif 'mail' in profile: email = profile['mail'] if email == '': current_ap

Re: OAUTH2 Problem with AzureAD

2022-04-21 Thread Yogesh Mahajan
Hi Asmita, Kindly use the 2nd patch(RM_7325_v2.patch) shared in a later email. Thanks, Yogesh Mahajan EnterpriseDB On Thu, Apr 21, 2022 at 11:59 AM Asmita Thapliyal < asmita.thapli...@gmail.com> wrote: > Thanks a lot. > > I was facing some minor issues with your code. Below lines of code works

Re: OAUTH2 Problem with AzureAD

2022-04-20 Thread Yogesh Mahajan
Hi Asmita, Kindly ignore the previous patch. Please use the v2 version. Thanks, Yogesh Mahajan EnterpriseDB On Thu, Apr 21, 2022 at 11:08 AM Yogesh Mahajan < yogesh.maha...@enterprisedb.com> wrote: > Hi Asmita, > > Here is a patch file which fixes RM7325 >

Re: OAUTH2 Problem with AzureAD

2022-04-20 Thread Yogesh Mahajan
Hi Asmita, Here is a patch file which fixes RM7325 or you can use snapshot build from here to test once patch is committed. Thanks, Yogesh Mahajan EnterpriseDB On Wed, Apr 20, 2022 at 6:17

Re: OAUTH2 Problem with AzureAD

2022-04-20 Thread Asmita Thapliyal
Hello Yogesh, Done. https://redmine.postgresql.org/issues/7325 Meanwhile, can the below change easily be incorporated in code to check if it works? if yes, then could you provide me the details. Also, the profile returned by Azure AD has the key 'mail' and current pgadmin code checks the value w

Re: OAUTH2 Problem with AzureAD

2022-04-20 Thread Asmita Thapliyal
Hello Khushboo, I get below error if I use - *https://graph.microsoft.com/v1.0 / * This one is resp.json() o/p I printed. {'error': {'code': 'BadRequest', 'message': "Resource not found for the segment 'profile'.", 'innerError': {'date': '2022-04-20T09:37:23',

Re: OAUTH2 Problem with AzureAD

2022-04-20 Thread Yogesh Mahajan
Hi, I was able to reproduce the issue. Below change is required in configuration - # Name of the Endpoint, ex: user 'OAUTH2_USERINFO_ENDPOINT': 'me', And Also, the profile returned by Azure AD has the key 'mail' and current pgadmin code checks the value with key = 'email' to retrieve user email

Re: OAUTH2 Problem with AzureAD

2022-04-20 Thread Khushboo Vashi
Hi, On Tue, Apr 19, 2022 at 11:30 PM Asmita Thapliyal < asmita.thapli...@gmail.com> wrote: > Hello! > > I have configured OAUTH2 with azure ad with below config > > 'OAUTH2_NAME': "azure", > > # The display name, ex: Google > > 'OAUTH2_DISPLAY_NAME': 'MS Azure', > >

OAUTH2 Problem with AzureAD

2022-04-19 Thread Asmita Thapliyal
Hello! I have configured OAUTH2 with azure ad with below config 'OAUTH2_NAME': "azure", # The display name, ex: Google 'OAUTH2_DISPLAY_NAME': 'MS Azure', # Oauth client id 'OAUTH2_CLIENT_ID': '', # Oauth secret 'OAUTH2_CLIENT_SECRET':