Graph API - Duvida sobre autenticação

PedroLucasBispoCunha-6568 20 Reputation points
2023-12-22T13:15:50.2366667+00:00

Olá, bom dia!

Gostaria de um apoio de vocês referente aos parâmetros da Graph API, possuímos uma ferramenta empresarial e estamos implementando a autenticação via Microsoft. Já preparamos todo o ambiente de login, no entanto, quando entramos com o e-mail coorporativo, a API retorna os dados pelo "login.live/ME.htm", porém, por motivo de segurança, o login.live é bloqueado em nosso ambiente.

Atualmente estamos usando os seguintes parâmetros (parâmetros fictícios, no ambiente de HML estão informações reais):

https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize? client_id={id},

response_type=code,

redirect_uri={url de direcionamento},

response_mode=query,

scope=https://graph.microsoft.com/User.Read.All,

state=12345&nonce=67890

Precisava saber se é possível passar algum parâmetro de configuração que indique que as informações devem ser retornadas pelo login.microsoft, a fim de evitar bloqueios na rede.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,309 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 45,841 Reputation points
    2023-12-25T07:26:56.28+00:00

    Hi @Pedro Lucas Bispo Cunha

    The difference between login.live.com and login.microsoft.com is that the former is for logging in with a personal Microsoft account, and the latter is for logging in with a work/school account. Therefore, if you are trying to log in with a personal account, it will default to the login.live.com URL.

    If you want to log in using the login.microsoft.com URL, make sure the user logged in is a work account or a guest account that has joined organization.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.