web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

ODATA Value cannot be null.

(1) ShareShare
ReportReport
Posted on by 202
Hi,
 
I am getting the below error while browsing ODATA.
Does anyone know what can be the issue ?
 
/<Error>
<Message>An error has occurred.</Message>
<ExceptionMessage>Value cannot be null. Parameter name: value</ExceptionMessage>
<ExceptionType>System.ArgumentNullException</ExceptionType>
<StackTrace> at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.EdmModelExtensions.CreateDimensionLegalEntityPropertyAnnotation(EdmModel model, IEdmVocabularyAnnotatable target, String value) at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.AddEntityProperty(IFieldMetadata fieldMetadata, EntityType entityType, EdmPrimitiveTypeKind edmPrimitiveType, Boolean isNullable) at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.BuildProperty(IFieldMetadata fieldMetadata, HashSet`1 indexFields, EntityType entityType) at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.BuildEntityTypeAndProperties(IResourceDefinition resource, IEnumerable`1 extensionResources) at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder..ctor() at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.InitializeInstance() at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.get_Instance() at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.EdmModelProxy.get_DirectValueAnnotationsManager() at Microsoft.OData.Edm.ExtensionMethods.SetAnnotationValue(IEdmModel model, IEdmElement element, String namespaceName, String localName, Object value) at Microsoft.OData.Edm.Csdl.SerializationExtensionMethods.SetEdmxVersion(IEdmModel model, Version version) at System.Web.OData.MetadataController.GetModel() at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Tracing.Tracers.HttpControllerTracer.<ExecuteAsyncCore>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()</StackTrace>
</Error>/
I have the same question (0)
  • Layan Jwei Profile Picture
    8,282 Super User 2026 Season 2 on at
    Hi,
     
    Can you share with us more details?
     
    What is the entity you are trying to call?
    Is it get or post?
    Also what's the URL u are calling and if there is body what is the body?
     
    Thanks,
    Layan Jweihan
  • Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    Required parameters or attributes may be missing, causing null values to be passed where they should not be. You may need to debug and check your code logic.
    Best Regards,
    Hana
  • Judy Profile Picture
    Microsoft Employee on at
    Hi, the error message indicates that a value is null, you can check the code where the error occurs and ensure that all required values are properly initialized and assigned before being used. 
  • VM-02050213-0 Profile Picture
    202 on at
    Hi,

    this is just a URL/data that gives me this error.
    Basically it should give me list of all odata entities.
     
    thanks,
     
  • Layan Jwei Profile Picture
    8,282 Super User 2026 Season 2 on at
    Hi VM,

    maybe it's better if you show us a screenshot
    Make sure your url is correct and that you're getting your token correctly if you are using postman.

    i just tried it and it works perfectly fine


    Also from browser it's working fine, maybe make sure your user is a sys admin as well just in case

    Thanks,
    Layan Jweihan
  • VM-02050213-0 Profile Picture
    202 on at
    Hi,
     
    It is a simple URL which usually shows the odata entities.
    I have below version
    Installed product version : 10.0.38 (10.0.1777.95)
    Installed platform version : Update62 (7.0.7120.100)
    URL is the std url .
    I am not sure what the issue is here.
    Even in case there is an issue with any of the entity then it should atleast show which one is causing this error.

    Thanks,
  • VM-02050213-0 Profile Picture
    202 on at
    Is there a way to even debug this issue ?
  • Layan Jwei Profile Picture
    8,282 Super User 2026 Season 2 on at
    Hi,

    Can you try to call the URL from postman and let us know if you are facing the same issue?
  • CU26102337-0 Profile Picture
    2 on at
    I have the same error, how did you solve it?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 330 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 310

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 242 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans