Authentication and authorization basics for .us government

Balaita, George (George) **CTR** 0 Reputation points
2024-06-25T12:01:53.22+00:00

Hi,

I need to sign in and send email using GRAPH API for US Government.
I followed every step from here:
https://learn.microsoft.com/en-us/graph/auth/auth-concepts
https://learn.microsoft.com/en-us/graph/auth-register-app-v2
https://learn.microsoft.com/en-us/graph/deployments

But I get the Null Exception issue:
System.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.Graph.HttpProvider.<SendAsync>d__18.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Microsoft.Graph.BaseRequest.<SendRequestAsync>d__35.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

For global authentication, with ".com" everything works as expected.
Can you please advice me how should I debug it? Is there a way to check these configuration?

Thanks,
George

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

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.